Skip to content

Commit d0d8b7f

Browse files
committed
Remove 'unchecked' keyword
1 parent 2cdb23b commit d0d8b7f

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -926,8 +926,6 @@ impl parser {
926926
_ => { /* fallthrough */ }
927927
}
928928
return pexpr(self.parse_fn_expr(proto));
929-
} else if self.eat_keyword(~"unchecked") {
930-
return pexpr(self.parse_block_expr(lo, unchecked_blk));
931929
} else if self.eat_keyword(~"unsafe") {
932930
return pexpr(self.parse_block_expr(lo, unsafe_blk));
933931
} else if self.token == token::LBRACKET {
@@ -2210,12 +2208,7 @@ impl parser {
22102208
}
22112209

22122210
let lo = self.span.lo;
2213-
if self.eat_keyword(~"unchecked") {
2214-
self.expect(token::LBRACE);
2215-
let {inner, next} = maybe_parse_inner_attrs_and_next(self,
2216-
parse_attrs);
2217-
return (inner, self.parse_block_tail_(lo, unchecked_blk, next));
2218-
} else if self.eat_keyword(~"unsafe") {
2211+
if self.eat_keyword(~"unsafe") {
22192212
self.expect(token::LBRACE);
22202213
let {inner, next} = maybe_parse_inner_attrs_and_next(self,
22212214
parse_attrs);

src/libsyntax/parse/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ fn strict_keyword_table() -> HashMap<~str, ()> {
439439
~"ref", ~"return",
440440
~"struct",
441441
~"true", ~"trait", ~"type",
442-
~"unchecked", ~"use",
442+
~"use",
443443
~"while"
444444
];
445445
for keys.each |word| {

0 commit comments

Comments
 (0)