diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-05-16 21:02:20 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-05-16 21:02:20 +0800 |
commit | 52f6e3d1c2fa705a5160219b764ec508da338fa8 (patch) | |
tree | 5e507d1eab3181cf8aa50fc5dc2438930aa03910 | |
parent | b5805365fe8c828a79b0d63cb45025324581c545 (diff) | |
download | mrust-52f6e3d1c2fa705a5160219b764ec508da338fa8.tar.gz |
HIR Typecheck - Tweaks
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index 7c73644d..605df162 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -1208,7 +1208,7 @@ namespace { } des_ty = &des_ty_cache; } - this->equate_types_inner_coerce(node.span(), *des_ty, val.second); + this->context.equate_types_coerce(node.span(), *des_ty, val.second); } // Convert bounds on the type into rules @@ -3466,7 +3466,8 @@ void Context::add_binding(const Span& sp, ::HIR::Pattern& pat, const ::HIR::Type context.equate_types(sp, type, ::HIR::TypeRef::new_borrow( ::HIR::BorrowType::Shared, ::HIR::TypeRef(::HIR::CoreType::Str) )); ), (ByteString, - context.equate_types(sp, type, ::HIR::TypeRef::new_borrow( ::HIR::BorrowType::Shared, ::HIR::TypeRef::new_slice(::HIR::CoreType::U8) )); + // NOTE: Matches both &[u8] and &[u8; N], so doesn't provide type information + // TODO: Check the type. ), (Named, // TODO: Get type of the value and equate it |