about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/lib.rs
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2025-07-11 01:40:12 -0700
committerJosh Triplett <josh@joshtriplett.org>2025-08-08 11:01:12 -0700
commit34be8abb70d1f3247fd7907b6112934742e0abdc (patch)
tree9101213b2bcc767ab3adeb08ae26c6cd65d5b868 /compiler/rustc_resolve/src/lib.rs
parent0cc0b11cceae9bbb39bfb9b267e79b05c0d061c1 (diff)
downloadrust-34be8abb70d1f3247fd7907b6112934742e0abdc.tar.gz
rust-34be8abb70d1f3247fd7907b6112934742e0abdc.zip
mbe: Handle applying attribute rules with paths
Add infrastructure to apply an attribute macro given argument tokens and
body tokens.

Teach the resolver to consider `macro_rules` macros when looking for an
attribute via a path.

This does not yet handle local `macro_rules` attributes.
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
-rw-r--r--compiler/rustc_resolve/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs
index 2a75070ef54..8a190bf06ed 100644
--- a/compiler/rustc_resolve/src/lib.rs
+++ b/compiler/rustc_resolve/src/lib.rs
@@ -1028,13 +1028,14 @@ struct DeriveData {
 
 struct MacroData {
     ext: Arc<SyntaxExtension>,
+    attr_ext: Option<Arc<SyntaxExtension>>,
     nrules: usize,
     macro_rules: bool,
 }
 
 impl MacroData {
     fn new(ext: Arc<SyntaxExtension>) -> MacroData {
-        MacroData { ext, nrules: 0, macro_rules: false }
+        MacroData { ext, attr_ext: None, nrules: 0, macro_rules: false }
     }
 }