about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-02-24 20:48:24 +0000
committerbors <bors@rust-lang.org>2018-02-24 20:48:24 +0000
commit28a1e4ffefa2620ad9f4179ea339833448874fd3 (patch)
tree18a432b954cebc1cfdddc8f699e4be8e86bcac86 /src/libsyntax/parse
parent6070d3e47e5e9f15575a3bd33583358b52bc6eda (diff)
parent182f8820c4b53f811c140478a0105b2a7b77c5c3 (diff)
downloadrust-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.rs2
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 {