aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2024-10-15 22:10:35 -0400
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-19 15:32:17 +0100
commit225748e0f12ea94181560d9cc6bc18a877e6addc (patch)
tree26b397e2d378d2f1b5f09acee256c27c97f5ef31 /gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
parentc7e00b1e8757f44e2afdb0263c6f0400e44a1f95 (diff)
downloadgcc-225748e0f12ea94181560d9cc6bc18a877e6addc.zip
gcc-225748e0f12ea94181560d9cc6bc18a877e6addc.tar.gz
gcc-225748e0f12ea94181560d9cc6bc18a877e6addc.tar.bz2
gccrs: Handle const generic parameters during resolution 2.0
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 <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc')
-rw-r--r--gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc8
1 files changed, 8 insertions, 0 deletions
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 d3a3c5d..92a1151 100644
--- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
+++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
@@ -287,6 +287,14 @@ TopLevel::visit (AST::TypeParam &type_param)
}
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)
{
insert_or_error_out (tuple_struct.get_struct_name (), tuple_struct,