diff options
Diffstat (limited to 'gcc/rust/backend/rust-compile-context.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-context.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h index b191554..a4c32d8 100644 --- a/gcc/rust/backend/rust-compile-context.h +++ b/gcc/rust/backend/rust-compile-context.h @@ -268,8 +268,6 @@ public: return compiler.translated; } - virtual ~TyTyResolveCompile () {} - void visit (TyTy::ErrorType &) override { gcc_unreachable (); } void visit (TyTy::InferType &) override { gcc_unreachable (); } @@ -460,6 +458,14 @@ public: translated = ctx->get_backend ()->reference_type (base_compiled_type); } + void visit (TyTy::StrType &type) override + { + ::Btype *compiled_type = nullptr; + bool ok = ctx->lookup_compiled_types (type.get_ty_ref (), &compiled_type); + rust_assert (ok); + translated = compiled_type; + } + private: TyTyResolveCompile (Context *ctx) : ctx (ctx) {} |