We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents eec77d9 + 43cadc9 commit 69f6a19Copy full SHA for 69f6a19
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