diff options
| author | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-08-09 20:33:10 +0200 |
|---|---|---|
| committer | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-08-14 18:11:56 +0200 |
| commit | e7ef23e90e5b63e86bd77061ab92b86190a4eb3c (patch) | |
| tree | 04ee2497bd3c93c463a239f6291a20c4a42c32e5 /compiler/rustc_attr_parsing/src/context.rs | |
| parent | 106731f714ddce004f7dde265b4528ed1cf0c320 (diff) | |
| download | rust-e7ef23e90e5b63e86bd77061ab92b86190a4eb3c.tar.gz rust-e7ef23e90e5b63e86bd77061ab92b86190a4eb3c.zip | |
Pass the target type down to `parse_attribute_list`
Diffstat (limited to 'compiler/rustc_attr_parsing/src/context.rs')
| -rw-r--r-- | compiler/rustc_attr_parsing/src/context.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_attr_parsing/src/context.rs b/compiler/rustc_attr_parsing/src/context.rs index 6045a8b28a2..dc98f2c8df1 100644 --- a/compiler/rustc_attr_parsing/src/context.rs +++ b/compiler/rustc_attr_parsing/src/context.rs @@ -9,7 +9,9 @@ use rustc_errors::{DiagCtxtHandle, Diagnostic}; use rustc_feature::{AttributeTemplate, Features}; use rustc_hir::attrs::AttributeKind; use rustc_hir::lints::{AttributeLint, AttributeLintKind}; -use rustc_hir::{AttrArgs, AttrItem, AttrPath, Attribute, HashIgnoredAttrId, HirId}; +use rustc_hir::{ + AttrArgs, AttrItem, AttrPath, Attribute, HashIgnoredAttrId, HirId, MethodKind, Target, +}; use rustc_session::Session; use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span, Symbol, sym}; @@ -691,6 +693,7 @@ impl<'sess> AttributeParser<'sess, Early> { attrs, target_span, target_node_id, + Target::Crate, // Does not matter, we're not going to emit errors anyways OmitDoc::Skip, std::convert::identity, |_lint| { @@ -777,6 +780,7 @@ impl<'sess, S: Stage> AttributeParser<'sess, S> { attrs: &[ast::Attribute], target_span: Span, target_id: S::Id, + target: Target, omit_doc: OmitDoc, lower_span: impl Copy + Fn(Span) -> Span, |
