diff options
| author | bors <bors@rust-lang.org> | 2023-12-03 05:23:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-03 05:23:24 +0000 |
| commit | 6318e9dd89c6719330b4237db1a70daaacb8c527 (patch) | |
| tree | badf8374db86a55c449af7f34546d3773045de16 /compiler/rustc_parse/src | |
| parent | 33515d7497c0b197bb394d29ec80b73ed423e441 (diff) | |
| parent | 3a6753b8b90588499cc2ddae032adfd691774691 (diff) | |
Auto merge of #3202 - rust-lang:rustup-2023-12-03, r=saethlin
Automatic Rustup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index a4eb36dd92c..98e68e682ab 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -18,7 +18,6 @@ use crate::errors::{ UnexpectedConstParamDeclaration, UnexpectedConstParamDeclarationSugg, UnmatchedAngleBrackets, UseEqInstead, WrapType, }; - use crate::fluent_generated as fluent; use crate::parser; use crate::parser::attr::InnerAttrPolicy; @@ -772,8 +771,10 @@ impl<'a> Parser<'a> { && let ast::AttrKind::Normal(attr_kind) = &attr.kind && let [segment] = &attr_kind.item.path.segments[..] && segment.ident.name == sym::cfg + && let Some(args_span) = attr_kind.item.args.span() && let Ok(next_attr) = snapshot.parse_attribute(InnerAttrPolicy::Forbidden(None)) && let ast::AttrKind::Normal(next_attr_kind) = next_attr.kind + && let Some(next_attr_args_span) = next_attr_kind.item.args.span() && let [next_segment] = &next_attr_kind.item.path.segments[..] && segment.ident.name == sym::cfg && let Ok(next_expr) = snapshot.parse_expr() @@ -787,23 +788,14 @@ impl<'a> Parser<'a> { let margin = self.sess.source_map().span_to_margin(next_expr.span).unwrap_or(0); let sugg = vec