aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-09-09 16:30:07 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-09-09 16:30:07 +0100
commit0f85a9421349ff80329f7a6db4a70eff58bf49bc (patch)
treebc0f64ed7eb4c784302c1c74af0303abfdfe585a /gcc
parentfefc0b3ffbe059a62e035810f00c6ad55438761b (diff)
downloadgcc-0f85a9421349ff80329f7a6db4a70eff58bf49bc.zip
gcc-0f85a9421349ff80329f7a6db4a70eff58bf49bc.tar.gz
gcc-0f85a9421349ff80329f7a6db4a70eff58bf49bc.tar.bz2
Add HIR lowering for Trait Bounds
Super trait bounds need to be lowered to HIR.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/hir/rust-ast-lower-item.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-item.h b/gcc/rust/hir/rust-ast-lower-item.h
index dfc2612..d5c56c0 100644
--- a/gcc/rust/hir/rust-ast-lower-item.h
+++ b/gcc/rust/hir/rust-ast-lower-item.h
@@ -579,6 +579,15 @@ public:
}
std::vector<std::unique_ptr<HIR::TypeParamBound>> type_param_bounds;
+ if (trait.has_type_param_bounds ())
+ {
+ for (auto &bound : trait.get_type_param_bounds ())
+ {
+ HIR::TypeParamBound *b = lower_bound (bound.get ());
+ type_param_bounds.push_back (
+ std::unique_ptr<HIR::TypeParamBound> (b));
+ }
+ }
std::vector<std::unique_ptr<HIR::TraitItem>> trait_items;
std::vector<HirId> trait_item_ids;