https://gcc.gnu.org/g:5fb06c9be8264b67cab428035ceaefac3df90129

commit 5fb06c9be8264b67cab428035ceaefac3df90129
Author: Arthur Cohen <arthur.co...@embecosm.com>
Date:   Wed Jan 22 14:14:45 2025 +0000

    session manager: Call into DesugarForLoops
    
    gcc/rust/ChangeLog:
    
            * rust-session-manager.cc (Session::compile_crate): Call the 
visitor.

Diff:
---
 gcc/rust/rust-session-manager.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index b4b95167c528..e8ec155f8e21 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -18,6 +18,7 @@
 
 #include "rust-session-manager.h"
 #include "rust-collect-lang-items.h"
+#include "rust-desugar-for-loops.h"
 #include "rust-diagnostics.h"
 #include "rust-hir-pattern-analysis.h"
 #include "rust-immutable-name-resolution-context.h"
@@ -614,6 +615,9 @@ Session::compile_crate (const char *filename)
   // expansion pipeline stage
 
   expansion (parsed_crate, name_resolution_ctx);
+
+  AST::DesugarForLoops ().go (parsed_crate);
+
   rust_debug ("\033[0;31mSUCCESSFULLY FINISHED EXPANSION \033[0m");
   if (options.dump_option_enabled (CompileOptions::EXPANSION_DUMP))
     {

Reply via email to