aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-tyty.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-compile-tyty.h')
-rw-r--r--gcc/rust/backend/rust-compile-tyty.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-tyty.h b/gcc/rust/backend/rust-compile-tyty.h
index a3720f8..52ad2f9 100644
--- a/gcc/rust/backend/rust-compile-tyty.h
+++ b/gcc/rust/backend/rust-compile-tyty.h
@@ -54,10 +54,10 @@ public:
void visit (TyTy::TupleType &type) override
{
- if (type.num_fields () == 0)
- translated = backend->unit_type ();
- else
- gcc_unreachable ();
+ // this interface is only for unit-type the -type interface takes into
+ // account the context
+ rust_assert (type.num_fields () == 0);
+ translated = backend->unit_type ();
}
void visit (TyTy::ArrayType &) override { gcc_unreachable (); }