diff options
Diffstat (limited to 'gcc/rust/backend/rust-compile-context.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-context.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h index 298ff50..5a0805b 100644 --- a/gcc/rust/backend/rust-compile-context.h +++ b/gcc/rust/backend/rust-compile-context.h @@ -223,8 +223,6 @@ public: void visit (TyTy::ErrorType &type) override { gcc_unreachable (); } - void visit (TyTy::UnitType &type) override { gcc_unreachable (); } - void visit (TyTy::InferType &type) override { gcc_unreachable (); } void visit (TyTy::FnType &type) override { gcc_unreachable (); } @@ -233,6 +231,11 @@ public: void visit (TyTy::ParamType &type) override { gcc_unreachable (); } + void visit (TyTy::UnitType &type) override + { + translated = ctx->get_backend ()->void_type (); + } + void visit (TyTy::ADTType &type) override { ::Btype *compiled_type = nullptr; |