diff options
| author | bors <bors@rust-lang.org> | 2023-01-09 13:13:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-09 13:13:35 +0000 |
| commit | d61d359d5ef5e3192611297805dbfbb52c55de8f (patch) | |
| tree | 374888d2e6ddfc2006e9eb8dadc2f0d6214562e8 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 87a202e6f23896f867457c0a26b31b367fa1c0e0 (diff) | |
| parent | 236ae262bc80dabf67669a2763fda5034982b9b9 (diff) | |
| download | rust-d61d359d5ef5e3192611297805dbfbb52c55de8f.tar.gz rust-d61d359d5ef5e3192611297805dbfbb52c55de8f.zip | |
Auto merge of #2753 - RalfJung:rustup, r=RalfJung
Rustup Pulls in https://github.com/rust-lang/rust/pull/104658
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 13 |
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)) }; |
