From: Arthur Cohen <[email protected]>

Flatten the name resolution context after Late name resolution to make it more
useable for subsequent passes.

gcc/rust/ChangeLog:

        * rust-session-manager.cc (Session::compile_crate): Call 
nr_ctx.flatten()
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: 
https://github.com/Rust-GCC/gccrs/commit/9910735e7ee56caa223dfa15eb041ba24d269b07

The commit has NOT been mentioned in any issue.

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4551

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

diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index e680d2b65..b3bc99249 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -770,6 +770,9 @@ Session::compile_crate (const char *filename)
   // resolution pipeline stage
   Resolver2_0::Late (name_resolution_ctx).go (parsed_crate);
 
+  // FIXME: Or run it within Late at the end?
+  name_resolution_ctx.flatten ();
+
   if (options.dump_option_enabled (CompileOptions::RESOLUTION_DUMP))
     dump_name_resolution (name_resolution_ctx);
 
-- 
2.54.0

Reply via email to