aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-session-manager.cc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2025-04-04 14:21:00 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2025-04-14 18:23:54 +0200
commit76477f965552b5872bb14255f272bff78978ef0c (patch)
treede7889ce38ded542d4937bab1cdfac8439112a13 /gcc/rust/rust-session-manager.cc
parent4aa6cae27bd1ca3513dcb512158ed27a4afe800d (diff)
downloadgcc-76477f965552b5872bb14255f272bff78978ef0c.zip
gcc-76477f965552b5872bb14255f272bff78978ef0c.tar.gz
gcc-76477f965552b5872bb14255f272bff78978ef0c.tar.bz2
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.
Diffstat (limited to 'gcc/rust/rust-session-manager.cc')
-rw-r--r--gcc/rust/rust-session-manager.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 15f21ef..48acbf34 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -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))