Skip to content

Commit

Permalink
Insert trait names during toplevel resolution 2.0
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
powerboat9 authored and P-E-P committed Oct 27, 2024
1 parent 8f23349 commit daa5fd3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit daa5fd3

Please sign in to comment.