diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-03 08:00:04 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-03 08:00:04 +0800 |
commit | 55bc4a9e019b1b5e51fec58030a30ea9146de45c (patch) | |
tree | fa17e394ab154cdb7512edc0515449969cf2b5ce /src/mir/mir_builder.cpp | |
parent | 892b1029b5c9fa2bc12316dcf927d1aa36135538 (diff) | |
download | mrust-55bc4a9e019b1b5e51fec58030a30ea9146de45c.tar.gz |
HIR/MIR - VTable work
Diffstat (limited to 'src/mir/mir_builder.cpp')
-rw-r--r-- | src/mir/mir_builder.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mir/mir_builder.cpp b/src/mir/mir_builder.cpp index 202daac0..d539ef89 100644 --- a/src/mir/mir_builder.cpp +++ b/src/mir/mir_builder.cpp @@ -226,6 +226,9 @@ void MirBuilder::push_stmt_assign(const Span& sp, ::MIR::LValue dst, ::MIR::RVal (DstMeta, // Doesn't move ), + (DstPtr, + // Doesn't move + ), (MakeDst, // Doesn't move ptr_val this->moved_lvalue(sp, e.meta_val); @@ -741,7 +744,8 @@ void MirBuilder::with_val_type(const Span& sp, const ::MIR::LValue& val, ::std:: BUG(sp, "Field on unit-like struct - " << ty); ), (Tuple, - ASSERT_BUG(sp, e.field_index < se.size(), "Field index out of range in tuple-struct"); + ASSERT_BUG(sp, e.field_index < se.size(), + "Field index out of range in tuple-struct " << ty << " - " << e.field_index << " > " << se.size()); const auto& fld = se[e.field_index]; if( monomorphise_type_needed(fld.ent) ) { auto sty = monomorphise_type(sp, str.m_params, te.path.m_data.as_Generic().m_params, fld.ent); @@ -753,7 +757,8 @@ void MirBuilder::with_val_type(const Span& sp, const ::MIR::LValue& val, ::std:: } ), (Named, - ASSERT_BUG(sp, e.field_index < se.size(), "Field index out of range in struct"); + ASSERT_BUG(sp, e.field_index < se.size(), + "Field index out of range in struct " << ty << " - " << e.field_index << " > " << se.size()); const auto& fld = se[e.field_index].second; if( monomorphise_type_needed(fld.ent) ) { auto sty = monomorphise_type(sp, str.m_params, te.path.m_data.as_Generic().m_params, fld.ent); |