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,12 +1017,14 @@ macro_rules! visit_place_fns {
|
|||
let mut context = context;
|
||||
|
||||
if !place.projection.is_empty() {
|
||||
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…
Add table
Add a link
Reference in a new issue