-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Extend -Zdump-mir output with two-phase borrow info #105815
Conversation
r? @lcnr (rustbot has picked a reviewer for you, use r? to override) |
generally in favor even though the representation isn't great. I am not sure how long it would take me to figure out what r? @oli-obk |
We could include more information in the rust/compiler/rustc_middle/src/mir/pretty.rs Line 501 in 3af7df9
|
@oli-obk can you spell out how much more info you think you'd want? Right now this really is just a boolean flag, so the presence/absence of a tag like (Maybe you're saying you'd want to know about when the reservation begins versus when the exclusive access itself actually begins, which I would agree would be superior, but I do not think that information is directly reflected in the MIR structure, and I think I'd bias towards making the |
(I have been musing whether there would be value in having the MIR itself use general structure where every mutable borrow is modelled as a two-phase borrow, with distinct "reserve-mut" and "exercise-the-reservation" operations. But that is a huge change that would need far broader discussion.) |
Oh, I don't mean more information, just clarifying what |
r=me with either the new comments added or not ^^ @rustbot author |
@pnkfelix Ping from triage: Can you post your status on this PR? This has sat idle for a few months. |
Ping from triage: I'm closing this due to inactivity, Please reopen when you are ready to continue with this. @rustbot label: +S-inactive |
This should cause no breakage since its just injecting a comment
/*2pb*/
(and the-Zdump-mir
output is unstable anyway).