Skip to content

Commit

Permalink
Handle const generic parameters during 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): Handle ConstGenericParam.
	* resolve/rust-toplevel-name-resolver-2.0.h
	(TopLevel::visit): Likewise.

Signed-off-by: Owen Avery <[email protected]>
  • Loading branch information
powerboat9 authored and P-E-P committed Oct 17, 2024
1 parent a9931e9 commit 2b74b5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 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 @@ -286,6 +286,14 @@ TopLevel::visit (AST::TypeParam &type_param)
Namespace::Types);
}

void
TopLevel::visit (AST::ConstGenericParam &const_param)
{
insert_or_error_out (const_param.get_name (), const_param, Namespace::Values);

DefaultResolver::visit (const_param);
}

void
TopLevel::visit (AST::TupleStruct &tuple_struct)
{
Expand Down
1 change: 1 addition & 0 deletions gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ class TopLevel : public DefaultResolver
void visit (AST::TypeAlias &type_item) override;
void visit (AST::ExternCrate &crate) override;
void visit (AST::TypeParam &type_param) override;
void visit (AST::ConstGenericParam &const_param) override;

void visit (AST::UseDeclaration &use) override;
};
Expand Down

0 comments on commit 2b74b5c

Please sign in to comment.