Skip to content

Commit 463d5d5

Browse files
committed
Merge pull request #3607 from gutworth/incoming
utterly trivial refactoring
2 parents fe62ff4 + 459fe6a commit 463d5d5

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2227,17 +2227,11 @@ impl parser {
22272227
}
22282228

22292229
let lo = self.span.lo;
2230-
if self.eat_keyword(~"unsafe") {
2231-
self.expect(token::LBRACE);
2232-
let {inner, next} = maybe_parse_inner_attrs_and_next(self,
2233-
parse_attrs);
2234-
return (inner, self.parse_block_tail_(lo, unsafe_blk, next));
2235-
} else {
2236-
self.expect(token::LBRACE);
2237-
let {inner, next} = maybe_parse_inner_attrs_and_next(self,
2238-
parse_attrs);
2239-
return (inner, self.parse_block_tail_(lo, default_blk, next));
2240-
}
2230+
let us = self.eat_keyword(~"unsafe");
2231+
self.expect(token::LBRACE);
2232+
let {inner, next} = maybe_parse_inner_attrs_and_next(self,
2233+
parse_attrs);
2234+
return (inner, self.parse_block_tail_(lo, if us { unsafe_blk } else { default_blk }, next));
22412235
}
22422236

22432237
fn parse_block_no_value() -> blk {

0 commit comments

Comments
 (0)