diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-02-16 15:40:28 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-03-01 10:35:07 +0000 |
commit | 9af2ae0ff91535da104db0d3828d863770439fad (patch) | |
tree | 57b375ba818f22c70066c87a4d9c2a1c1b78f69e /gcc/rust/backend/rust-compile-item.h | |
parent | 06bb1d6542a9d07f4d866613a5b039be7bcb5f95 (diff) | |
download | gcc-9af2ae0ff91535da104db0d3828d863770439fad.zip gcc-9af2ae0ff91535da104db0d3828d863770439fad.tar.gz gcc-9af2ae0ff91535da104db0d3828d863770439fad.tar.bz2 |
Support Generic arguments to Structs
This removes StructFieldType from the TyTy base as it is not a type that
can be unified against.
It adds in a substition mapper implementation which will likely change
over time when this this support is extended over to Functions and
TupleStructs.
Note generic argument binding is not supported as part of this yet.
Fixes #235
Diffstat (limited to 'gcc/rust/backend/rust-compile-item.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-item.h | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/gcc/rust/backend/rust-compile-item.h b/gcc/rust/backend/rust-compile-item.h index cfbe969..c6b135b 100644 --- a/gcc/rust/backend/rust-compile-item.h +++ b/gcc/rust/backend/rust-compile-item.h @@ -39,34 +39,6 @@ public: item->accept_vis (compiler); } - void visit (HIR::TupleStruct &struct_decl) - { - TyTy::BaseType *resolved = nullptr; - if (!ctx->get_tyctx ()->lookup_type ( - struct_decl.get_mappings ().get_hirid (), &resolved)) - { - rust_fatal_error (struct_decl.get_locus (), - "Failed to lookup type for struct decl"); - return; - } - - TyTyResolveCompile::compile (ctx, resolved); - } - - void visit (HIR::StructStruct &struct_decl) - { - TyTy::BaseType *resolved = nullptr; - if (!ctx->get_tyctx ()->lookup_type ( - struct_decl.get_mappings ().get_hirid (), &resolved)) - { - rust_fatal_error (struct_decl.get_locus (), - "Failed to lookup type for struct decl"); - return; - } - - TyTyResolveCompile::compile (ctx, resolved); - } - void visit (HIR::StaticItem &var) { TyTy::BaseType *resolved_type = nullptr; |