diff options
author | John Hodge <tpg@mutabah.net> | 2016-11-17 17:32:56 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-11-17 17:32:56 +0800 |
commit | c61e776e0bc64042e153cbec705be91bf642fa5f (patch) | |
tree | fddd35f6d192a1bc5100729dbbf1f7567a669c9e /src | |
parent | 6f5324639d3978b16330ade63a84e3e20515f255 (diff) | |
download | mrust-c61e776e0bc64042e153cbec705be91bf642fa5f.tar.gz |
HIR Typecheck Static - Copy for ErasedType
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/static.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/hir_typeck/static.cpp b/src/hir_typeck/static.cpp index 2ce2915b..ae808165 100644 --- a/src/hir_typeck/static.cpp +++ b/src/hir_typeck/static.cpp @@ -1004,7 +1004,13 @@ bool StaticTraitResolve::type_is_copy(const Span& sp, const ::HIR::TypeRef& ty) return false; ), (ErasedType, - TODO(Span(), "ErasedType - It's Copy if Copy is a trait in it"); + for(const auto& trait : e.m_traits) + { + if( find_named_trait_in_trait(sp, m_lang_Copy, {}, *trait.m_trait_ptr, trait.m_path.m_path, trait.m_path.m_params, ty, [](const auto&, auto ){ }) ) { + return true; + } + } + return false; ), (Tuple, for(const auto& ty : e) |