From 235932042738838ac9ea9f9a32656bcd609c7497 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Sat, 7 Jan 2023 17:15:23 +0000 Subject: Add name resolution to generic argument associated item bindings When specifying generic arguments to Traits we can also specify the associated types using `` syntax we need to add name resolution to the type argument here and rely on the type resolution pass to ensure the associated type exists and to setup the associated types accordingly. Addresses #1720 Signed-off-by: Philip Herron gcc/rust/ChangeLog: * resolve/rust-ast-resolve-type.cc (ResolveGenericArgs::go): --- gcc/rust/resolve/rust-ast-resolve-type.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/rust/resolve') diff --git a/gcc/rust/resolve/rust-ast-resolve-type.cc b/gcc/rust/resolve/rust-ast-resolve-type.cc index 76eb93b..7846603 100644 --- a/gcc/rust/resolve/rust-ast-resolve-type.cc +++ b/gcc/rust/resolve/rust-ast-resolve-type.cc @@ -589,6 +589,11 @@ ResolveGenericArgs::go (AST::GenericArgs &generic_args, resolver.resolve_disambiguated_generic (arg); } + + for (auto &binding : generic_args.get_binding_args ()) + { + ResolveType::go (binding.get_type ().get ()); + } } } // namespace Resolver -- cgit v1.1