From 4c873251e79980a86da81df4d7180e757c472ce9 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Mon, 25 Oct 2021 18:15:33 +0100 Subject: Add support for higher ranked trait bounds This adds the type checking for the bounds which will add the relevant bounds to the associated types and perform the relevant type checking required. Fixes #442 --- gcc/rust/hir/tree/rust-hir-item.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/rust/hir') diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h index 4fdd764..21f0781 100644 --- a/gcc/rust/hir/tree/rust-hir-item.h +++ b/gcc/rust/hir/tree/rust-hir-item.h @@ -1387,6 +1387,8 @@ public: return generic_params; } + WhereClause &get_where_clause () { return where_clause; } + protected: Struct (Analysis::NodeMapping mappings, Identifier struct_name, std::vector> generic_params, @@ -1994,6 +1996,8 @@ public: } } + WhereClause &get_where_clause () { return where_clause; } + protected: /* Use covariance to implement clone function as returning this object * rather than base */ @@ -2704,6 +2708,8 @@ public: return trait_ref; } + WhereClause &get_where_clause () { return where_clause; } + protected: ImplBlock *clone_item_impl () const override { return new ImplBlock (*this); } }; -- cgit v1.1