diff options
| author | bors <bors@rust-lang.org> | 2025-07-28 02:09:05 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-28 02:09:05 +0000 | 
| commit | 733dab558992d902d6d17576de1da768094e2cf3 (patch) | |
| tree | c36891d3e7417fc84ef299b806d7601eb3d26471 /compiler/rustc_passes/src | |
| parent | 2b5e239c6b86cde974b0ef0f8e23754fb08ff3c5 (diff) | |
| parent | d33c8f933696ab1fcdbca369d4c18f436a7faf4c (diff) | |
| download | rust-733dab558992d902d6d17576de1da768094e2cf3.tar.gz rust-733dab558992d902d6d17576de1da768094e2cf3.zip | |
Auto merge of #144556 - matthiaskrgr:rollup-aayo3h5, r=matthiaskrgr
Rollup of 6 pull requests
Successful merges:
 - rust-lang/rust#143607 (Port the proc macro attributes to the new attribute parsing infrastructure)
 - rust-lang/rust#144471 (Remove `compiler-builtins-{no-asm,mangled-names}`)
 - rust-lang/rust#144495 (bump cargo_metadata)
 - rust-lang/rust#144523 (rustdoc: save target modifiers)
 - rust-lang/rust#144534 (check_static_item: explain should_check_for_sync choices)
 - rust-lang/rust#144535 (miri: for ABI mismatch errors, say which argument is the problem)
Failed merges:
 - rust-lang/rust#144536 (miri subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_passes/src')
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 27 | 
1 files changed, 17 insertions, 10 deletions
| diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index 4b524bb2bd2..0b329cc38b0 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -130,6 +130,22 @@ impl<'tcx> CheckAttrVisitor<'tcx> { for attr in attrs { let mut style = None; match attr { + Attribute::Parsed(AttributeKind::ProcMacro(_)) => { + self.check_proc_macro(hir_id, target, ProcMacroKind::FunctionLike) + } + Attribute::Parsed(AttributeKind::ProcMacroAttribute(_)) => { + self.check_proc_macro(hir_id, target, ProcMacroKind::Attribute); + } + Attribute::Parsed(AttributeKind::ProcMacroDerive { span: attr_span, .. }) => { + self.check_generic_attr( + hir_id, + sym::proc_macro_derive, + *attr_span, + target, + Target::Fn, + ); + self.check_proc_macro(hir_id, target, ProcMacroKind::Derive) + } Attribute::Parsed( AttributeKind::SkipDuringMethodDispatch { span: attr_span, .. } | AttributeKind::Coinductive(attr_span) @@ -275,6 +291,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> { | AttributeKind::MacroTransparency(_) | AttributeKind::Pointee(..) | AttributeKind::Dummy + | AttributeKind::RustcBuiltinMacro { .. } | AttributeKind::OmitGdbPrettyPrinterSection, ) => { /* do nothing */ } Attribute::Parsed(AttributeKind::AsPtr(attr_span)) => { @@ -373,16 +390,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> { [sym::should_panic, ..] => { self.check_generic_attr_unparsed(hir_id, attr, target, Target::Fn) } - [sym::proc_macro, ..] => { - self.check_proc_macro(hir_id, target, ProcMacroKind::FunctionLike) - } - [sym::proc_macro_attribute, ..] => { - self.check_proc_macro(hir_id, target, ProcMacroKind::Attribute); - } - [sym::proc_macro_derive, ..] => { - self.check_generic_attr_unparsed(hir_id, attr, target, Target::Fn); - self.check_proc_macro(hir_id, target, ProcMacroKind::Derive) - } [sym::autodiff_forward, ..] | [sym::autodiff_reverse, ..] => { self.check_autodiff(hir_id, attr, span, target) } | 
