about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-07 00:53:19 +0000
committerbors <bors@rust-lang.org>2023-01-07 00:53:19 +0000
commit84f22e44c588be9c9058d6d6ed02a21aa32ad843 (patch)
tree8f14167ff4ed4c11cdeb6053e8cc27338a22dc45 /compiler/rustc_parse/src/parser
parent7ac9572c48435b5342ad3550d6036bde835d37dc (diff)
parenta1b3393f5feb93c1241452ada9bf39c4349471e7 (diff)
downloadrust-84f22e44c588be9c9058d6d6ed02a21aa32ad843.tar.gz
rust-84f22e44c588be9c9058d6d6ed02a21aa32ad843.zip
Auto merge of #106544 - matthiaskrgr:rollup-e9prjed, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #106287 (Add some docs to `bug`, `span_bug` and `delay_span_bug`)
 - #106341 (refactor: clean up `errors.rs` and `error_codes_check.rs`)
 - #106453 (Improve include macro documentation)
 - #106466 (Fix rustdoc source code rendering for `#[path = "../path/to/mod.rs"]` links)
 - #106528 (Tiny formatting fix)
 - #106534 (rustdoc-gui: Use new block syntax for define-function in goml scripts)
 - #106542 (Add default and latest stable edition to --edition in rustc (attempt 2))

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 1fc1ffd6cb6..9f436783ced 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -1503,12 +1503,13 @@ impl<'a> Parser<'a> {
                 prior_type_ascription: self.last_type_ascription,
             });
             (lo.to(self.prev_token.span), ExprKind::MacCall(mac))
-        } else if self.check(&token::OpenDelim(Delimiter::Brace)) &&
-            let Some(expr) = self.maybe_parse_struct_expr(&qself, &path) {
-                if qself.is_some() {
-                    self.sess.gated_spans.gate(sym::more_qualified_paths, path.span);
-                }
-                return expr;
+        } else if self.check(&token::OpenDelim(Delimiter::Brace))
+            && let Some(expr) = self.maybe_parse_struct_expr(&qself, &path)
+        {
+            if qself.is_some() {
+                self.sess.gated_spans.gate(sym::more_qualified_paths, path.span);
+            }
+            return expr;
         } else {
             (path.span, ExprKind::Path(qself, path))
         };