diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-12-18 05:03:32 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-12-18 05:03:32 +0000 |
| commit | d49845e5fe45bcffe30df0963a97b2ad859abbf8 (patch) | |
| tree | 95c98c8b70f583931bf51b01a8fcf0cf854f2dc0 /compiler/rustc_parse/src/parser/attr.rs | |
| parent | b6120f98c5ad9f16d613d6fd55f546b186d40bae (diff) | |
| parent | 6bc1fe1c3a40367abf3d54253fb1a478ced4b73b (diff) | |
| download | rust-d49845e5fe45bcffe30df0963a97b2ad859abbf8.tar.gz rust-d49845e5fe45bcffe30df0963a97b2ad859abbf8.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_parse/src/parser/attr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/attr.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_parse/src/parser/attr.rs b/compiler/rustc_parse/src/parser/attr.rs index b6fa2099588..9da4ab5a788 100644 --- a/compiler/rustc_parse/src/parser/attr.rs +++ b/compiler/rustc_parse/src/parser/attr.rs @@ -1,10 +1,8 @@ -use rustc_ast as ast; -use rustc_ast::attr; use rustc_ast::token::{self, Delimiter}; +use rustc_ast::{self as ast, Attribute, attr}; use rustc_errors::codes::*; use rustc_errors::{Diag, PResult}; -use rustc_span::symbol::kw; -use rustc_span::{BytePos, Span}; +use rustc_span::{BytePos, Span, kw}; use thin_vec::ThinVec; use tracing::debug; @@ -48,7 +46,7 @@ impl<'a> Parser<'a> { let start_pos = self.num_bump_calls; loop { let attr = if self.check(&token::Pound) { - let prev_outer_attr_sp = outer_attrs.last().map(|attr| attr.span); + let prev_outer_attr_sp = outer_attrs.last().map(|attr: &Attribute| attr.span); let inner_error_reason = if just_parsed_doc_comment { Some(InnerAttrForbiddenReason::AfterOuterDocComment { |
