1
Fork 0

MIR visitor: Don't treat debuginfo field access as a use of the struct

This commit is contained in:
Camelid 2020-11-15 12:58:34 -08:00
parent 603ab5bd6e
commit f7bf282d9b

View file

@ -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);