From 3aeb9f47187f9b7ad55e32bcd273556823f383c6 Mon Sep 17 00:00:00 2001 From: lrh2000 Date: Sat, 10 Apr 2021 22:53:32 +0800 Subject: Introduce limited support for the never type --- gcc/rust/backend/rust-compile-context.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/rust/backend/rust-compile-context.h') diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h index 8866575..2024a6f 100644 --- a/gcc/rust/backend/rust-compile-context.h +++ b/gcc/rust/backend/rust-compile-context.h @@ -503,6 +503,11 @@ public: translated = compiled_type; } + void visit (TyTy::NeverType &) override + { + translated = ctx->get_backend ()->void_type (); + } + private: TyTyResolveCompile (Context *ctx) : ctx (ctx), translated (nullptr) {} -- cgit v1.1