diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-11-25 13:04:57 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2021-11-25 13:36:27 +0000 |
commit | e532893ba43349a8dcb0374fd6e0f415fcd96fe1 (patch) | |
tree | 425195e61336278c7a64a860f7b09fa74f92f17f /gcc | |
parent | 717b6da459b26ace9a3c303cfa5e485ff8935709 (diff) | |
download | gcc-e532893ba43349a8dcb0374fd6e0f415fcd96fe1.zip gcc-e532893ba43349a8dcb0374fd6e0f415fcd96fe1.tar.gz gcc-e532893ba43349a8dcb0374fd6e0f415fcd96fe1.tar.bz2 |
Always update the type context for monoprhized items except type params
We need to update the type context type with the newly monomorphized types
we guarded against ADT's and functions because they were never added before
though this does not work for generic reference's to ADT's this updates
the check accordingly.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/typecheck/rust-substitution-mapper.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/rust/typecheck/rust-substitution-mapper.cc b/gcc/rust/typecheck/rust-substitution-mapper.cc index a439416..f4fec10 100644 --- a/gcc/rust/typecheck/rust-substitution-mapper.cc +++ b/gcc/rust/typecheck/rust-substitution-mapper.cc @@ -31,10 +31,8 @@ SubstMapperInternal::Resolve (TyTy::BaseType *base, rust_assert (mapper.resolved != nullptr); // insert these new implict types into the context - bool is_fn = mapper.resolved->get_kind () == TyTy::TypeKind::FNDEF; - bool is_adt = mapper.resolved->get_kind () == TyTy::TypeKind::ADT; bool is_param = mapper.resolved->get_kind () == TyTy::TypeKind::PARAM; - if (!is_fn && !is_adt && !is_param) + if (!is_param) { auto context = TypeCheckContext::get (); context->insert_type ( |