diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-04-28 13:09:15 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-04-28 13:09:15 +0100 |
commit | be158fc97f7f4d43d60797f2af27c86753b0ffb5 (patch) | |
tree | 3d0f3aaef56b6190bf19ef2722add0047afce145 /gcc/rust/backend/rust-compile-implitem.cc | |
parent | 712ae2f173df0c2d9018bf5ce708ffbbaee10d64 (diff) | |
download | gcc-be158fc97f7f4d43d60797f2af27c86753b0ffb5.zip gcc-be158fc97f7f4d43d60797f2af27c86753b0ffb5.tar.gz gcc-be158fc97f7f4d43d60797f2af27c86753b0ffb5.tar.bz2 |
Complete refactor of generic traits handling
From PR #1086 I introduced a new setup_associated_types2 interface which
is used to ensure we handle the complex associated types in libcore slices
but this interface was inconsistant as well as the get_projected_type.
This path refactors the code base to get rid of the old
setup_associated_types interface in favour of this new one. It also removes
the get_projected_type interface which was not going to work either.
Fixes #1105
Diffstat (limited to 'gcc/rust/backend/rust-compile-implitem.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile-implitem.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-implitem.cc b/gcc/rust/backend/rust-compile-implitem.cc index 7cc214c..9dc6d14 100644 --- a/gcc/rust/backend/rust-compile-implitem.cc +++ b/gcc/rust/backend/rust-compile-implitem.cc @@ -52,6 +52,7 @@ CompileTraitItem::visit (HIR::TraitItemFunc &func) rust_assert (concrete->get_kind () == TyTy::TypeKind::FNDEF); TyTy::FnType *fntype = static_cast<TyTy::FnType *> (concrete); + fntype->monomorphize (); // items can be forward compiled which means we may not need to invoke this // code. We might also have already compiled this generic function as well. |