MIR visitor: Don't treat debuginfo field access as a use of the struct
This commit is contained in:
parent
603ab5bd6e
commit
f7bf282d9b
1 changed files with 7 additions and 5 deletions
|
@ -1017,11 +1017,13 @@ macro_rules! visit_place_fns {
|
||||||
let mut context = context;
|
let mut context = context;
|
||||||
|
|
||||||
if !place.projection.is_empty() {
|
if !place.projection.is_empty() {
|
||||||
context = if context.is_mutating_use() {
|
if context.is_use() {
|
||||||
PlaceContext::MutatingUse(MutatingUseContext::Projection)
|
context = if context.is_mutating_use() {
|
||||||
} else {
|
PlaceContext::MutatingUse(MutatingUseContext::Projection)
|
||||||
PlaceContext::NonMutatingUse(NonMutatingUseContext::Projection)
|
} else {
|
||||||
};
|
PlaceContext::NonMutatingUse(NonMutatingUseContext::Projection)
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.visit_local(&place.local, context, location);
|
self.visit_local(&place.local, context, location);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue