MIR visitor: Don't treat debuginfo field access as a use of the struct
This commit is contained in:
parent
603ab5bd6e
commit
f7bf282d9b
@ -1017,11 +1017,13 @@ macro_rules! visit_place_fns {
|
||||
let mut context = context;
|
||||
|
||||
if !place.projection.is_empty() {
|
||||
context = if context.is_mutating_use() {
|
||||
PlaceContext::MutatingUse(MutatingUseContext::Projection)
|
||||
} else {
|
||||
PlaceContext::NonMutatingUse(NonMutatingUseContext::Projection)
|
||||
};
|
||||
if context.is_use() {
|
||||
context = if context.is_mutating_use() {
|
||||
PlaceContext::MutatingUse(MutatingUseContext::Projection)
|
||||
} else {
|
||||
PlaceContext::NonMutatingUse(NonMutatingUseContext::Projection)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
self.visit_local(&place.local, context, location);
|
||||
|
Loading…
Reference in New Issue
Block a user