diff options
author | John Hodge <tpg@mutabah.net> | 2016-07-06 00:11:26 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-07-06 00:11:26 +0800 |
commit | 46e659ed150e39386fc2eb1c7caa870b8c1c4458 (patch) | |
tree | 37dc068cb857a854d503378b3f146f6a7b2e1203 /src | |
parent | b439fff0adca76dbe1f9b3d3218d8f710f282fc2 (diff) | |
download | mrust-46e659ed150e39386fc2eb1c7caa870b8c1c4458.tar.gz |
HIR Typecheck CS - Ignore CoerceUnsized for now
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index 7bbfb847..0135475a 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -2084,6 +2084,8 @@ namespace { const auto& ty = context.m_ivars.get_type(v.left_ty); const auto& ty_r = context.m_ivars.get_type(node_ptr->m_res_type); + // TODO: CoerceUnsized trait + // 1. Check that the source type can coerce TU_MATCH( ::HIR::TypeRef::Data, (ty_r.m_data), (e), (Infer, @@ -2100,10 +2102,14 @@ namespace { return true; ), (Path, - TODO(Span(), "check_coerce - Coercion from " << ty_r); + //TODO(Span(), "check_coerce - Coercion from " << ty_r); + context.equate_types(sp, ty, node_ptr->m_res_type); + return true; ), (Generic, - TODO(Span(), "check_coerce - Coercion from " << ty_r); + //TODO(Span(), "check_coerce - Coercion from " << ty_r); + context.equate_types(sp, ty, node_ptr->m_res_type); + return true; ), (TraitObject, // TODO: Can bare trait objects coerce? |