aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-item.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-04-28 13:09:15 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-04-28 13:09:15 +0100
commitbe158fc97f7f4d43d60797f2af27c86753b0ffb5 (patch)
tree3d0f3aaef56b6190bf19ef2722add0047afce145 /gcc/rust/backend/rust-compile-item.cc
parent712ae2f173df0c2d9018bf5ce708ffbbaee10d64 (diff)
downloadgcc-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-item.cc')
-rw-r--r--gcc/rust/backend/rust-compile-item.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-item.cc b/gcc/rust/backend/rust-compile-item.cc
index 80b7ceb..969c852 100644
--- a/gcc/rust/backend/rust-compile-item.cc
+++ b/gcc/rust/backend/rust-compile-item.cc
@@ -127,6 +127,7 @@ CompileItem::visit (HIR::Function &function)
{
rust_assert (concrete->get_kind () == TyTy::TypeKind::FNDEF);
fntype = static_cast<TyTy::FnType *> (concrete);
+ fntype->monomorphize ();
}
}