aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-item.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-06-16 11:41:48 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-06-16 12:09:07 +0100
commit44481c1c2bdf7d160928dde30f48fdc54e75bf38 (patch)
treec23d9bc49979377b15a57dbdc7524595a9a5be0b /gcc/rust/backend/rust-compile-item.h
parent59f09fd5a48046ceba064bde2f230386fbc3700f (diff)
downloadgcc-44481c1c2bdf7d160928dde30f48fdc54e75bf38.zip
gcc-44481c1c2bdf7d160928dde30f48fdc54e75bf38.tar.gz
gcc-44481c1c2bdf7d160928dde30f48fdc54e75bf38.tar.bz2
Cleanup HIR to canonicalize TraitImpl to be treated as an impl block
HIR should desugar the AST as best it can. Trait impl blocks are just impl blocks. The HIR impl block can just have an optional<TraitRef> in order to represent a trait impl block.
Diffstat (limited to 'gcc/rust/backend/rust-compile-item.h')
-rw-r--r--gcc/rust/backend/rust-compile-item.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/gcc/rust/backend/rust-compile-item.h b/gcc/rust/backend/rust-compile-item.h
index e681652..e3b6d0f 100644
--- a/gcc/rust/backend/rust-compile-item.h
+++ b/gcc/rust/backend/rust-compile-item.h
@@ -290,22 +290,6 @@ public:
compile_fns);
}
- void visit (HIR::TraitImpl &impl_block) override
- {
- TyTy::BaseType *self_lookup = nullptr;
- if (!ctx->get_tyctx ()->lookup_type (
- impl_block.get_type ()->get_mappings ().get_hirid (), &self_lookup))
- {
- rust_error_at (impl_block.get_locus (),
- "failed to resolve type of impl");
- return;
- }
-
- for (auto &impl_item : impl_block.get_impl_items ())
- CompileInherentImplItem::Compile (self_lookup, impl_item.get (), ctx,
- compile_fns);
- }
-
private:
CompileItem (Context *ctx, bool compile_fns, TyTy::BaseType *concrete)
: HIRCompileBase (ctx), compile_fns (compile_fns), concrete (concrete)