-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Field accesses in debuginfo are treated as real uses of the base local #77454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@jonas-schievink Can you describe where the change needs to be made? The visit method for debuginfo seems to be correct: rust/compiler/rustc_middle/src/mir/visit.rs Lines 827 to 842 in 603ab5b
It shells out to rust/compiler/rustc_middle/src/mir/visit.rs Lines 974 to 990 in 603ab5b
So what part should I change? Thanks! |
Looks like the problem is here: rust/compiler/rustc_middle/src/mir/visit.rs Lines 1020 to 1024 in 603ab5b
|
Okay, thank you! |
MIR may contain debuginfo like this after inlining:
Here, the field access
(*_6).0
is treated like a use of the_6
local in MIR visitors (usingPlaceContext::NonMutatingUse
), even though it is not an actual use of_6
.Instead, it should be using
PlaceContext::NonUse(NonUseContext::VarDebugInfo)
.The text was updated successfully, but these errors were encountered: