diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-07-10 21:02:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-10 21:02:06 +0000 |
commit | 4560f469ee33536cec6af0f8e5816ff97de60de0 (patch) | |
tree | 9787b1f711ea87021e42dfa9d3316c6b8645a762 /gcc/rust/backend | |
parent | f090e7ca9fa0b19f1cd7df16a0476b6e252c5ef1 (diff) | |
parent | defb583203923bf4edeb0531e85fa28de5015ecb (diff) | |
download | gcc-4560f469ee33536cec6af0f8e5816ff97de60de0.zip gcc-4560f469ee33536cec6af0f8e5816ff97de60de0.tar.gz gcc-4560f469ee33536cec6af0f8e5816ff97de60de0.tar.bz2 |
Merge #551
551: Initial AssociatedType support r=philberty a=philberty
Traits can define Type aliasses which must enforce the correct resolution
onto their respective TraitImplBlocks. This PR adds all the necessary building
blocks for the initial support.
More work is needed in checking for trait-impl-item consistency with its respective
Trait item types.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r-- | gcc/rust/backend/rust-compile-context.h | 2 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-tyty.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h index 5d19099..d822937 100644 --- a/gcc/rust/backend/rust-compile-context.h +++ b/gcc/rust/backend/rust-compile-context.h @@ -336,6 +336,8 @@ public: void visit (TyTy::InferType &) override { gcc_unreachable (); } + void visit (TyTy::PlaceholderType &) override { gcc_unreachable (); } + void visit (TyTy::ParamType ¶m) override { param.resolve ()->accept_vis (*this); diff --git a/gcc/rust/backend/rust-compile-tyty.h b/gcc/rust/backend/rust-compile-tyty.h index 8576235..d2890e0 100644 --- a/gcc/rust/backend/rust-compile-tyty.h +++ b/gcc/rust/backend/rust-compile-tyty.h @@ -48,6 +48,8 @@ public: void visit (TyTy::ADTType &) override { gcc_unreachable (); } + void visit (TyTy::PlaceholderType &) override { gcc_unreachable (); } + void visit (TyTy::TupleType &type) override { if (type.num_fields () == 0) |