]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add tuple struct to the type namespace
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 24 Jan 2024 16:06:56 +0000 (17:06 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 1 Aug 2024 14:52:27 +0000 (16:52 +0200)
Only tuple struct constructor was added to the resolver.

gcc/rust/ChangeLog:

* resolve/rust-toplevel-name-resolver-2.0.cc (GlobbingVisitor::visit):
Add tuple struct type to the resolver's context.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc

index 75d9bb82131ff6d72c9ec591a472b7b9843b771a..820ba271ae0c948de5068a1789bafc02703d8974 100644 (file)
@@ -81,8 +81,13 @@ void
 GlobbingVisitor::visit (AST::TupleStruct &tuple_struct)
 {
   if (tuple_struct.get_visibility ().is_public ())
-    ctx.insert_shadowable (tuple_struct.get_identifier (),
-                          tuple_struct.get_node_id (), Namespace::Values);
+    {
+      ctx.insert_shadowable (tuple_struct.get_identifier (),
+                            tuple_struct.get_node_id (), Namespace::Types);
+
+      ctx.insert_shadowable (tuple_struct.get_identifier (),
+                            tuple_struct.get_node_id (), Namespace::Values);
+    }
 }
 
 void