From 2497a1b63855e400eb600f97ca7f91cdc5770c9f Mon Sep 17 00:00:00 2001 From: Owen Avery Date: Thu, 10 Jul 2025 18:57:12 -0400 Subject: [PATCH] Collect lang items after expansion This allows macros to create lang items. gcc/rust/ChangeLog: * rust-session-manager.cc (Session::compile_crate): Collect lang items after expansion. Signed-off-by: Owen Avery --- gcc/rust/rust-session-manager.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc index c88f46757535..2421955b02a6 100644 --- a/gcc/rust/rust-session-manager.cc +++ b/gcc/rust/rust-session-manager.cc @@ -612,13 +612,13 @@ Session::compile_crate (const char *filename) if (last_step == CompileOptions::CompileStep::Expansion) return; - AST::CollectLangItems ().go (parsed_crate); - auto name_resolution_ctx = Resolver2_0::NameResolutionContext (); // expansion pipeline stage expansion (parsed_crate, name_resolution_ctx); + AST::CollectLangItems ().go (parsed_crate); + rust_debug ("\033[0;31mSUCCESSFULLY FINISHED EXPANSION \033[0m"); if (options.dump_option_enabled (CompileOptions::EXPANSION_DUMP)) {