cleanup mir visitor for rustc::pass_by_value

This commit is contained in:
lcnr
2022-07-01 16:21:21 +02:00
parent 7e2733bb1d
commit cf9c0a5935
23 changed files with 193 additions and 150 deletions

View File

@@ -418,7 +418,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
PlaceContext::MutatingUse(MutatingUseContext::Borrow)
}
};
self.visit_local(&reborrowed_place_ref.local, ctx, location);
self.visit_local(reborrowed_place_ref.local, ctx, location);
self.visit_projection(reborrowed_place_ref, ctx, location);
return;
}
@@ -431,7 +431,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
}
Mutability::Mut => PlaceContext::MutatingUse(MutatingUseContext::AddressOf),
};
self.visit_local(&reborrowed_place_ref.local, ctx, location);
self.visit_local(reborrowed_place_ref.local, ctx, location);
self.visit_projection(reborrowed_place_ref, ctx, location);
return;
}