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