diff mbox series

[073/125] gccrs: Add modules to type namespace

Message ID 20240801145809.366388-75-arthur.cohen@embecosm.com
State New
Headers show
Series [001/125] Rust: Make 'tree'-level 'MAIN_NAME_P' work | expand

Commit Message

Arthur Cohen Aug. 1, 2024, 2:57 p.m. UTC
From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

gcc/rust/ChangeLog:

	* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Module
	should be added to the type namespace in order to be retrieved later.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
---
 gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
index 3b1ccc1d3c5..5e6f5e9bd78 100644
--- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
+++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
@@ -72,7 +72,7 @@  TopLevel::go (AST::Crate &crate)
 void
 TopLevel::visit (AST::Module &module)
 {
-  // FIXME: Do we need to insert the module in the type namespace?
+  insert_or_error_out (module.get_name (), module, Namespace::Types);
 
   auto sub_visitor = [this, &module] () {
     for (auto &item : module.get_items ())