Extend comment in UsedLocals::visit_lhs
This commit is contained in:
parent
41b315a470
commit
43cadc99b7
1 changed files with 3 additions and 1 deletions
|
@ -422,7 +422,9 @@ impl UsedLocals<'tcx> {
|
||||||
// A use, not a definition.
|
// A use, not a definition.
|
||||||
self.visit_place(place, PlaceContext::MutatingUse(MutatingUseContext::Store), location);
|
self.visit_place(place, PlaceContext::MutatingUse(MutatingUseContext::Store), location);
|
||||||
} else {
|
} else {
|
||||||
// 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
|
||||||
|
// toward its use count. There might be other locals still, used in an indexing
|
||||||
|
// projection.
|
||||||
self.super_projection(
|
self.super_projection(
|
||||||
place.as_ref(),
|
place.as_ref(),
|
||||||
PlaceContext::MutatingUse(MutatingUseContext::Projection),
|
PlaceContext::MutatingUse(MutatingUseContext::Projection),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue