diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-09-06 21:44:29 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-09-06 21:44:29 +0800 |
commit | c5292971bcc621df9974b241ef7b5b926df4a9ec (patch) | |
tree | cddfab3c2f5f1437e61065c96a24e00b63778eb7 /src/hir_expand/closures.cpp | |
parent | 6ccee8db1e838a9c0c1c2c65a4a5c2a413cb5304 (diff) | |
download | mrust-c5292971bcc621df9974b241ef7b5b926df4a9ec.tar.gz |
HIR Expand - Reborrow in `box`
Diffstat (limited to 'src/hir_expand/closures.cpp')
-rw-r--r-- | src/hir_expand/closures.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hir_expand/closures.cpp b/src/hir_expand/closures.cpp index b58f2398..3b0fb6a4 100644 --- a/src/hir_expand/closures.cpp +++ b/src/hir_expand/closures.cpp @@ -943,6 +943,8 @@ namespace { if( m_resolve.type_is_copy(sp, m_variable_types.at(slot)) ) { usage = ::HIR::ValueUsage::Borrow; } + // Wait, is this valid? + // - Maybe it's needed becuase reborrow is after this pass? else if( m_variable_types.at(slot).m_data.is_Borrow() && m_variable_types.at(slot).m_data.as_Borrow().type == ::HIR::BorrowType::Unique ) { usage = ::HIR::ValueUsage::Mutate; } |