summaryrefslogtreecommitdiff
path: root/src/mir/from_hir.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-31 14:07:45 +0800
committerJohn Hodge <tpg@mutabah.net>2016-12-31 14:07:45 +0800
commit5deed177a5a6fcd7bad86c8dd4f5866f7b578de3 (patch)
tree5e5ed81e55a0c6a89ab51ff5127adb0ae5607357 /src/mir/from_hir.cpp
parent7ef1d63e51f4fa14def0a1fabe7a988e5d50ec82 (diff)
downloadmrust-5deed177a5a6fcd7bad86c8dd4f5866f7b578de3.tar.gz
MIR - Fix a bit of invalid MIR
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r--src/mir/from_hir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp
index 4f72099d..60084e3d 100644
--- a/src/mir/from_hir.cpp
+++ b/src/mir/from_hir.cpp
@@ -1181,7 +1181,7 @@ namespace {
{
// HACK: FixedSizeArray uses `A: Unsize<[T]>` which will lead to the above code not working (as the size isn't known).
// - Maybe _Meta on the `&A` would work as a stopgap (since A: Sized, it won't collide with &[T] or similar)
- auto size_lval = m_builder.lvalue_or_temp( node.span(), ::HIR::TypeRef(::HIR::CoreType::Usize), ::MIR::RValue::make_DstMeta({ ptr_lval.clone() }) );
+ auto size_lval = m_builder.lvalue_or_temp( node.span(), ::HIR::TypeRef(::HIR::CoreType::Usize), ::MIR::RValue::make_DstMeta({ ::MIR::LValue::make_Deref({ box$(ptr_lval.clone()) }) }) );
m_builder.set_result( node.span(), ::MIR::RValue::make_MakeDst({ mv$(ptr_lval), mv$(size_lval) }) );
}
else