From e3390f5602149c9f918efdd9fdc63448920da916 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Wed, 7 Jul 2021 16:53:57 +0100 Subject: 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 --- gcc/rust/backend/rust-compile-context.h | 2 ++ gcc/rust/backend/rust-compile-tyty.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'gcc/rust/backend') 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) -- cgit v1.1