summaryrefslogtreecommitdiff
path: root/src/trans/target.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/trans/target.cpp')
-rw-r--r--src/trans/target.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/trans/target.cpp b/src/trans/target.cpp
index 81dc8c0c..7aa46b35 100644
--- a/src/trans/target.cpp
+++ b/src/trans/target.cpp
@@ -876,6 +876,13 @@ namespace {
return true;
}
}
+ // Handle the NonZero lang item (TODO: Cleaner?)
+ if( te.path.m_data.as_Generic().m_path == resolve.m_crate.get_lang_item_path(sp, "non_zero") )
+ {
+ out_path.sub_fields.push_back(0);
+ out_path.size = r->size;
+ return true;
+ }
}
} break;
TU_ARM(ty.m_data, Borrow, _te) { (void)_te;
@@ -919,6 +926,7 @@ namespace {
{
nz_path.index = 1;
::std::reverse(nz_path.sub_fields.begin(), nz_path.sub_fields.end());
+ DEBUG("nz_path = " << nz_path.sub_fields);
size_t max_size = 0;
size_t max_align = 0;
for(auto& t : mono_types)