diff options
| author | bors <bors@rust-lang.org> | 2018-02-24 20:48:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-02-24 20:48:24 +0000 |
| commit | 28a1e4ffefa2620ad9f4179ea339833448874fd3 (patch) | |
| tree | 18a432b954cebc1cfdddc8f699e4be8e86bcac86 /src/libsyntax/parse | |
| parent | 6070d3e47e5e9f15575a3bd33583358b52bc6eda (diff) | |
| parent | 182f8820c4b53f811c140478a0105b2a7b77c5c3 (diff) | |
| download | rust-28a1e4ffefa2620ad9f4179ea339833448874fd3.tar.gz rust-28a1e4ffefa2620ad9f4179ea339833448874fd3.zip | |
Auto merge of #48510 - Manishearth:rollup, r=Manishearth
Rollup of 15 pull requests - Successful merges: #47987, #48056, #48061, #48084, #48143, #48185, #48206, #48208, #48232, #48246, #48258, #48317, #48353, #48356, #48402 - Failed merges:
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1a33de84429..efc191f24ac 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -6482,6 +6482,8 @@ impl<'a> Parser<'a> { && self.look_ahead(1, |t| *t != token::OpenDelim(token::Brace)) { // UNSAFE FUNCTION ITEM self.bump(); // `unsafe` + // `{` is also expected after `unsafe`, in case of error, include it in the diagnostic + self.check(&token::OpenDelim(token::Brace)); let abi = if self.eat_keyword(keywords::Extern) { self.parse_opt_abi()?.unwrap_or(Abi::C) } else { |
