Closed
Description
MIR may contain debuginfo like this after inlining:
scope 1 {
debug x => _3; // in scope 1 at $DIR/inline-closure-captures.rs:11:9: 11:10
scope 2 {
debug _q => _10; // in scope 2 at $DIR/inline-closure-captures.rs:11:14: 11:16
debug q => (*((*_6).0: &i32)); // in scope 2 at $DIR/inline-closure-captures.rs:10:23: 10:24
debug t => (*((*_6).1: &T)); // in scope 2 at $DIR/inline-closure-captures.rs:10:17: 10:18
let mut _9: T; // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
}
}
Here, the field access (*_6).0
is treated like a use of the _6
local in MIR visitors (using PlaceContext::NonMutatingUse
), even though it is not an actual use of _6
.
Instead, it should be using PlaceContext::NonUse(NonUseContext::VarDebugInfo)
.