aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-context.h
diff options
context:
space:
mode:
authorlrh2000 <lrh2000@pku.edu.cn>2021-04-10 22:53:32 +0800
committerlrh2000 <lrh2000@pku.edu.cn>2021-04-18 10:21:37 +0800
commit3aeb9f47187f9b7ad55e32bcd273556823f383c6 (patch)
treec42044bbf0bac300b37cfb2e786fdc5c06a29838 /gcc/rust/backend/rust-compile-context.h
parentc5fdf8cc544f9647e2cf28a2da431bfa1faacd15 (diff)
downloadgcc-3aeb9f47187f9b7ad55e32bcd273556823f383c6.zip
gcc-3aeb9f47187f9b7ad55e32bcd273556823f383c6.tar.gz
gcc-3aeb9f47187f9b7ad55e32bcd273556823f383c6.tar.bz2
Introduce limited support for the never type
Diffstat (limited to 'gcc/rust/backend/rust-compile-context.h')
-rw-r--r--gcc/rust/backend/rust-compile-context.h5
1 files changed, 5 insertions, 0 deletions
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) {}