Skip to content

Commit

Permalink
HIR Expand Reborrow - Fix usage annotations for *foo into &mut **foo
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Jan 21, 2024
1 parent 3b282bd commit 9ee3138
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hir_expand/reborrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ namespace {
|| dynamic_cast< ::HIR::ExprNode_Deref*>(node_ptr.get())
)
{
if( auto* inner = dynamic_cast< ::HIR::ExprNode_Deref*>(node_ptr.get()) ) {
inner->m_value->m_usage = HIR::ValueUsage::Mutate;
}
DEBUG("Insert reborrow - " << node_ptr->span() << " - type=" << node_ptr->m_res_type);
auto sp = node_ptr->span();
auto ty_mut = node_ptr->m_res_type.clone();
Expand Down

0 comments on commit 9ee3138

Please sign in to comment.