From: Owen Avery Date: Thu, 10 Jul 2025 22:57:12 +0000 (-0400) Subject: gccrs: Collect lang items after expansion X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=884c8a41a70ccf10fc000904d3544582d1e9ef0e;p=thirdparty%2Fgcc.git gccrs: 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 --- diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc index 1a8b147ebca..363feee18e9 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)) {