diff --git a/gcc/rust/resolve/rust-early-name-resolver-2.0.cc b/gcc/rust/resolve/rust-early-name-resolver-2.0.cc index 402af27c47b..ae02a17de3b 100644 --- a/gcc/rust/resolve/rust-early-name-resolver-2.0.cc +++ b/gcc/rust/resolve/rust-early-name-resolver-2.0.cc @@ -238,6 +238,10 @@ Early::visit (AST::MacroInvocation &invoc) { auto path = invoc.get_invoc_data ().get_path (); + if (invoc.get_kind () == AST::MacroInvocation::InvocKind::Builtin) + for (auto &pending_invoc : invoc.get_pending_eager_invocations ()) + pending_invoc->accept_vis (*this); + // When a macro is invoked by an unqualified identifier (not part of a // multi-part path), it is first looked up in textual scoping. If this does // not yield any results, then it is looked up in path-based scoping. If the diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude index 9b490c18bab..0f482df2f00 100644 --- a/gcc/testsuite/rust/compile/nr2/exclude +++ b/gcc/testsuite/rust/compile/nr2/exclude @@ -1,11 +1,6 @@ bounds1.rs break-rust2.rs break-rust3.rs -macros/builtin/eager1.rs -macros/builtin/eager2.rs -macros/builtin/recurse2.rs -macros/builtin/include3.rs -macros/builtin/include4.rs canonical_paths1.rs cfg1.rs cfg3.rs