Add hir::Attribute

This commit is contained in:
Jonathan Dönszelmann 2024-10-17 01:14:01 +02:00
parent 53b2c7cc95
commit d50c0a5480
No known key found for this signature in database
89 changed files with 1144 additions and 659 deletions

View file

@ -1,6 +1,5 @@
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;
@ -48,7 +47,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 {