gccrs: session: Desugar question mark operator after expansion instead.

gcc/rust/ChangeLog:

	* rust-session-manager.cc (Session::compile_crate): Call the visitor later in the pipeline.
This commit is contained in:
Arthur Cohen 2025-04-04 14:21:00 +02:00
parent 4aa6cae27b
commit 76477f9655

View file

@ -611,7 +611,6 @@ Session::compile_crate (const char *filename)
return;
AST::CollectLangItems ().go (parsed_crate);
AST::DesugarQuestionMark ().go (parsed_crate);
auto name_resolution_ctx = Resolver2_0::NameResolutionContext ();
// expansion pipeline stage
@ -619,6 +618,7 @@ Session::compile_crate (const char *filename)
expansion (parsed_crate, name_resolution_ctx);
AST::DesugarForLoops ().go (parsed_crate);
AST::DesugarQuestionMark ().go (parsed_crate);
rust_debug ("\033[0;31mSUCCESSFULLY FINISHED EXPANSION \033[0m");
if (options.dump_option_enabled (CompileOptions::EXPANSION_DUMP))