summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2018-03-09 21:44:39 +0800
committerJohn Hodge <tpg@mutabah.net>2018-03-09 21:44:39 +0800
commit2d8b49afbcdc4cd311c9fe7e5db558f283e51f84 (patch)
tree5ad0212f09a2f736cffe6930e3e0e6420fc2a7cc /src
parentf32a862b05d84c1256d4d6dfb850e0049c817847 (diff)
downloadmrust-2d8b49afbcdc4cd311c9fe7e5db558f283e51f84.tar.gz
Standalone MIRI - size_of_val and drop_in_place
Diffstat (limited to 'src')
-rw-r--r--src/trans/codegen_mmir.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/trans/codegen_mmir.cpp b/src/trans/codegen_mmir.cpp
index 22c232b2..faa3598d 100644
--- a/src/trans/codegen_mmir.cpp
+++ b/src/trans/codegen_mmir.cpp
@@ -223,7 +223,7 @@ namespace
auto fld_lv = ::MIR::LValue::make_Field({ box$(self), 0 });
for(const auto& e : repr->fields)
{
- if( !m_resolve.type_is_copy(sp, e.ty) ) {
+ if( m_resolve.type_needs_drop_glue(sp, e.ty) ) {
m_of << "\t\t""DROP " << fmt(fld_lv) << ";\n";
}
fld_lv.as_Field().field_index += 1;
@@ -386,7 +386,7 @@ namespace
fld_p_lv = ::MIR::LValue::make_Field({ box$(fld_p_lv), 0 });
fld_p_lv = ::MIR::LValue::make_Field({ box$(fld_p_lv), 0 });
- if( !m_resolve.type_is_copy(sp, *ity) ) {
+ if( m_resolve.type_needs_drop_glue(sp, *ity) ) {
auto fld_lv = ::MIR::LValue::make_Deref({ box$(fld_p_lv.clone()) });
m_of << "\t\t""DROP " << fmt(fld_lv) << ";\n";
}
@@ -421,7 +421,7 @@ namespace
auto fld_lv = ::MIR::LValue::make_Field({ box$(self), 0 });
for(const auto& e : repr->fields)
{
- if( !m_resolve.type_is_copy(sp, e.ty) ) {
+ if( m_resolve.type_needs_drop_glue(sp, e.ty) ) {
m_of << "\t\t""DROP " << fmt(fld_lv) << ";\n";
}
fld_lv.as_Field().field_index += 1;