]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Insert trait names during toplevel resolution 2.0
authorOwen Avery <powerboat9.gamer@gmail.com>
Wed, 16 Oct 2024 04:40:01 +0000 (00:40 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 21 Mar 2025 11:32:53 +0000 (12:32 +0100)
gcc/rust/ChangeLog:

* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::visit): Insert trait names into the type namespace.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc

index a0d8492b7eb6554603aa6066b1f4dd673516ddd3..fff3769cd70bba93cc3fba64f04f381bb7c86993 100644 (file)
@@ -120,6 +120,9 @@ TopLevel::visit (AST::Trait &trait)
   trait.insert_implict_self (
     std::unique_ptr<AST::GenericParam> (implicit_self));
 
+  insert_or_error_out (trait.get_identifier ().as_string (), trait,
+                      Namespace::Types);
+
   DefaultResolver::visit (trait);
 }