aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-09-09 16:29:30 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-09-09 16:29:30 +0100
commitfefc0b3ffbe059a62e035810f00c6ad55438761b (patch)
treee87a109692e8781418b802fb921b66924eb0e43b
parent49c9a88b3e3b0f8890c26a6fe0d553a86b127f5f (diff)
downloadgcc-fefc0b3ffbe059a62e035810f00c6ad55438761b.zip
gcc-fefc0b3ffbe059a62e035810f00c6ad55438761b.tar.gz
gcc-fefc0b3ffbe059a62e035810f00c6ad55438761b.tar.bz2
Add name resolution for Trait bounds
Trait bounds signify super-traits this adds name resolution for them.
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-item.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-item.h b/gcc/rust/resolve/rust-ast-resolve-item.h
index 2a2f956..87bf10e 100644
--- a/gcc/rust/resolve/rust-ast-resolve-item.h
+++ b/gcc/rust/resolve/rust-ast-resolve-item.h
@@ -593,6 +593,14 @@ public:
resolver->get_type_scope ().append_reference_for_def (
Self.get_id (), implicit_self->get_node_id ());
+ if (trait.has_type_param_bounds ())
+ {
+ for (auto &bound : trait.get_type_param_bounds ())
+ {
+ ResolveTypeBound::go (bound.get (), trait.get_node_id ());
+ }
+ }
+
for (auto &item : trait.get_trait_items ())
{
ResolveTraitItems::go (item.get (), Self);