-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)A-mir-optArea: MIR optimizationsArea: MIR optimizationsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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)
.
Metadata
Metadata
Assignees
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)A-mir-optArea: MIR optimizationsArea: MIR optimizationsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.