Remove 'unchecked' keyword
This commit is contained in:
parent
2cdb23bbc0
commit
d0d8b7fe64
2 changed files with 2 additions and 9 deletions
|
@ -926,8 +926,6 @@ impl parser {
|
||||||
_ => { /* fallthrough */ }
|
_ => { /* fallthrough */ }
|
||||||
}
|
}
|
||||||
return pexpr(self.parse_fn_expr(proto));
|
return pexpr(self.parse_fn_expr(proto));
|
||||||
} else if self.eat_keyword(~"unchecked") {
|
|
||||||
return pexpr(self.parse_block_expr(lo, unchecked_blk));
|
|
||||||
} else if self.eat_keyword(~"unsafe") {
|
} else if self.eat_keyword(~"unsafe") {
|
||||||
return pexpr(self.parse_block_expr(lo, unsafe_blk));
|
return pexpr(self.parse_block_expr(lo, unsafe_blk));
|
||||||
} else if self.token == token::LBRACKET {
|
} else if self.token == token::LBRACKET {
|
||||||
|
@ -2210,12 +2208,7 @@ impl parser {
|
||||||
}
|
}
|
||||||
|
|
||||||
let lo = self.span.lo;
|
let lo = self.span.lo;
|
||||||
if self.eat_keyword(~"unchecked") {
|
if self.eat_keyword(~"unsafe") {
|
||||||
self.expect(token::LBRACE);
|
|
||||||
let {inner, next} = maybe_parse_inner_attrs_and_next(self,
|
|
||||||
parse_attrs);
|
|
||||||
return (inner, self.parse_block_tail_(lo, unchecked_blk, next));
|
|
||||||
} else if self.eat_keyword(~"unsafe") {
|
|
||||||
self.expect(token::LBRACE);
|
self.expect(token::LBRACE);
|
||||||
let {inner, next} = maybe_parse_inner_attrs_and_next(self,
|
let {inner, next} = maybe_parse_inner_attrs_and_next(self,
|
||||||
parse_attrs);
|
parse_attrs);
|
||||||
|
|
|
@ -439,7 +439,7 @@ fn strict_keyword_table() -> HashMap<~str, ()> {
|
||||||
~"ref", ~"return",
|
~"ref", ~"return",
|
||||||
~"struct",
|
~"struct",
|
||||||
~"true", ~"trait", ~"type",
|
~"true", ~"trait", ~"type",
|
||||||
~"unchecked", ~"use",
|
~"use",
|
||||||
~"while"
|
~"while"
|
||||||
];
|
];
|
||||||
for keys.each |word| {
|
for keys.each |word| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue