about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/base.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-21 20:33:36 +0000
committerbors <bors@rust-lang.org>2025-09-21 20:33:36 +0000
commit9f32ccf35fb877270bc44a86a126440f04d676d0 (patch)
treeb3e4579913cdffec38689506b82f04faa3b717af /compiler/rustc_expand/src/base.rs
parent7e4b8d702fedccc9c7803773a22c2e053ac3b004 (diff)
parentadfc111fff3598dd24a94da518501ca127c1afd0 (diff)
downloadrust-9f32ccf35fb877270bc44a86a126440f04d676d0.tar.gz
rust-9f32ccf35fb877270bc44a86a126440f04d676d0.zip
Auto merge of #146862 - matthiaskrgr:rollup-1zqootr, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#143857 (Port #[macro_export] to the new attribute parsing infrastructure)
 - rust-lang/rust#146486 (Improve `core::sync::atomic` coverage)
 - rust-lang/rust#146606 (ci: x86_64-gnu-tools: Add `--test-args` regression test)
 - rust-lang/rust#146639 (std: merge definitions of `StdioPipes`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_expand/src/base.rs')
-rw-r--r--compiler/rustc_expand/src/base.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs
index 88f88f30a8c..3956125bace 100644
--- a/compiler/rustc_expand/src/base.rs
+++ b/compiler/rustc_expand/src/base.rs
@@ -942,9 +942,9 @@ impl SyntaxExtension {
                 .unwrap_or_default();
         let allow_internal_unsafe = find_attr!(attrs, AttributeKind::AllowInternalUnsafe(_));
 
-        let local_inner_macros = ast::attr::find_by_name(attrs, sym::macro_export)
-            .and_then(|macro_export| macro_export.meta_item_list())
-            .is_some_and(|l| ast::attr::list_contains_name(&l, sym::local_inner_macros));
+        let local_inner_macros =
+            *find_attr!(attrs, AttributeKind::MacroExport {local_inner_macros: l, ..} => l)
+                .unwrap_or(&false);
         let collapse_debuginfo = Self::get_collapse_debuginfo(sess, attrs, !is_local);
         tracing::debug!(?name, ?local_inner_macros, ?collapse_debuginfo, ?allow_internal_unsafe);