We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
UsedLocals::visit_lhs
1 parent 41b315a commit 43cadc9Copy full SHA for 43cadc9
compiler/rustc_mir/src/transform/simplify.rs
@@ -422,7 +422,9 @@ impl UsedLocals<'tcx> {
422
// A use, not a definition.
423
self.visit_place(place, PlaceContext::MutatingUse(MutatingUseContext::Store), location);
424
} else {
425
- // A definition. Although, it still might use other locals for indexing.
+ // A definition. The base local itself is not visited, so this occurrence is not counted
426
+ // toward its use count. There might be other locals still, used in an indexing
427
+ // projection.
428
self.super_projection(
429
place.as_ref(),
430
PlaceContext::MutatingUse(MutatingUseContext::Projection),
0 commit comments