aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-07-07 16:53:57 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-07-10 21:27:44 +0100
commite3390f5602149c9f918efdd9fdc63448920da916 (patch)
treef17c9224919b79e520ef5dc0a87c3550b53e077c /gcc/rust/backend
parent91aa2cba1ca4b481a9b3fed77054258a3fdc442d (diff)
downloadgcc-e3390f5602149c9f918efdd9fdc63448920da916.zip
gcc-e3390f5602149c9f918efdd9fdc63448920da916.tar.gz
gcc-e3390f5602149c9f918efdd9fdc63448920da916.tar.bz2
Introduce placeholder type
This is used in Traits with associated types that can contain TypeBounds but provides an ability to reuse out type system to check that trait items are compatible with their respective ImplBlock Items
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r--gcc/rust/backend/rust-compile-context.h2
-rw-r--r--gcc/rust/backend/rust-compile-tyty.h2
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 &param) 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)