about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-08-02 11:24:13 +0000
committerbors <bors@rust-lang.org>2019-08-02 11:24:13 +0000
commit1df512fcaeaf17639c5d28a3045814d6f7a7db97 (patch)
tree9b6c5c48d0e809e70979f5dcf9995282afbc5fde /src/libsyntax/parse
parentfc3ef9698fa80aa2f4da6208b8295bc8fa48eec5 (diff)
parent97098f466ad7a72e6690cf45e6ff2d60885396a9 (diff)
downloadrust-1df512fcaeaf17639c5d28a3045814d6f7a7db97.tar.gz
rust-1df512fcaeaf17639c5d28a3045814d6f7a7db97.zip
Auto merge of #63214 - Centril:rollup-hdb7dnx, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #62663 (More questionmarks in doctests)
 - #62969 (Changing the structure of `mir::interpret::InterpError`)
 - #63153 (Remove redundant method with const variable resolution)
 - #63189 (Doc improvements)
 - #63198 (Allow trailing comma in macro 2.0 declarations.)
 - #63202 (Fix ICE in #63135)
 - #63203 (Make is_mutable use PlaceRef instead of it's fields)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/mod.rs2
-rw-r--r--src/libsyntax/parse/parser.rs10
2 files changed, 10 insertions, 2 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 1aac8bbb7aa..002aa2f891e 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -368,7 +368,7 @@ pub fn stream_to_parser_with_base_dir<'a>(
 
 /// A sequence separator.
 pub struct SeqSep {
-    /// The seperator token.
+    /// The separator token.
     pub sep: Option<TokenKind>,
     /// `true` if a trailing separator is allowed.
     pub trailing_sep_allowed: bool,
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 7096d6799e2..8ca962a4419 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3592,7 +3592,15 @@ impl<'a> Parser<'a> {
         let mut etc_span = None;
 
         while self.token != token::CloseDelim(token::Brace) {
-            let attrs = self.parse_outer_attributes()?;
+            let attrs = match self.parse_outer_attributes() {
+                Ok(attrs) => attrs,
+                Err(err) => {
+                    if let Some(mut delayed) = delayed_err {
+                        delayed.emit();
+                    }
+                    return Err(err);
+                },
+            };
             let lo = self.token.span;
 
             // check that a comma comes after every field