aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-10-25 18:15:33 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-10-27 16:05:59 +0100
commit4c873251e79980a86da81df4d7180e757c472ce9 (patch)
treecae275fc36ea6082f915c0a9bbdbb3caf8b61fd7 /gcc/rust/hir
parent1b9ddc724051a678035b0b51e2e3932f01838a5e (diff)
downloadgcc-4c873251e79980a86da81df4d7180e757c472ce9.zip
gcc-4c873251e79980a86da81df4d7180e757c472ce9.tar.gz
gcc-4c873251e79980a86da81df4d7180e757c472ce9.tar.bz2
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
Diffstat (limited to 'gcc/rust/hir')
-rw-r--r--gcc/rust/hir/tree/rust-hir-item.h6
1 files changed, 6 insertions, 0 deletions
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<std::unique_ptr<GenericParam>> 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); }
};