aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2023-01-07 17:15:23 +0000
committerArthur Cohen <arthur.cohen@embecosm.com>2023-04-06 10:47:17 +0200
commit3f1dbb2cf8fd7d05550ccde3273a618c76cfaf5c (patch)
tree2a5c6cb7a14d119d30fff4b77370c5c6f8963dae /gcc
parente1394230b3fde0efa8afb53961764991f5fd0e7e (diff)
downloadgcc-3f1dbb2cf8fd7d05550ccde3273a618c76cfaf5c.zip
gcc-3f1dbb2cf8fd7d05550ccde3273a618c76cfaf5c.tar.gz
gcc-3f1dbb2cf8fd7d05550ccde3273a618c76cfaf5c.tar.bz2
gccrs: Add name resolution to generic argument associated item bindings
When specifying generic arguments to Traits we can also specify the associated types using `<BindingName=i32>` 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 gcc/rust/ChangeLog: * resolve/rust-ast-resolve-type.cc (ResolveGenericArgs::go): Add name resolution to Trait items. Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-type.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.cc b/gcc/rust/resolve/rust-ast-resolve-type.cc
index 16d05f3..28ab069 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