Future-proof MIR for dedicated debuginfo.#56278
Conversation
b4c1d38 to
58ff04b
Compare
nikomatsakis
left a comment
There was a problem hiding this comment.
these changes look fine, though I'd be happier if we could make some nice queries for getting info about the Nth upvar of a closure, so that the code would be a bit cleaner
src/librustc_mir/borrow_check/mod.rs
Outdated
There was a problem hiding this comment.
This really feels like information that could be encoded in the MIR, no? Well, I guess I can see an argument both ways.
There was a problem hiding this comment.
At minimum I would prefer if we can factor it out from borrow check into some kind of helper table that would be more re-usable.
There was a problem hiding this comment.
But I don't know that I want to block the PR on it. In general I feel like the borrow check code is kind of noodly and could use some extractions of this kind.
src/librustc/mir/mod.rs
Outdated
There was a problem hiding this comment.
btw, I think that if there are fields that are "debuginfo" that you feel other people should not rely on, we should comment that =)
(Like this one, judging from previous commit)
There was a problem hiding this comment.
I wonder if this has any overlap with the borrow check code I was noting earlier? (i.e., if some common helper could make both of these more concise)
src/librustc/mir/mod.rs
Outdated
There was a problem hiding this comment.
lol ok I guess that addresses my earlier concern
There was a problem hiding this comment.
I would like this to be part of the doc comment please though, why use only //?
There was a problem hiding this comment.
I got used to only using // for NOTE/FIXME/HACK, but I'll go change it.
src/librustc_mir/borrow_check/mod.rs
Outdated
There was a problem hiding this comment.
Yeah I think I would prefer to see closure_upvars(def_id, n) -> Upvar that returns this information "nicely collected".... (or closure_upvars(def_id) -> &[Upvar]).
But I won't hold up the PR on it.
r=me, depending on how you feel @eddyb
|
☔ The latest upstream changes (presumably #56198) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Triage; @eddyb Hello, have you been able to get back to this PR? |
|
Triage; @eddyb Hello again, have you been able to get back to this PR? |
|
Ping from triage @eddyb: What is the status of this PR? |
|
ping from triage @eddyb Unfortunately we haven't heard from you on this in a while, so I'm closing the PR to keep things tidy. Don't worry though, if you'll have time again in the future please reopen this PR, we'll be happy to review it again! |
|
I've started rebasing this, I'll try to get it merged next week. |
58ff04b to
2b546c4
Compare
|
I think I want to get rid of |
|
☔ The latest upstream changes (presumably #56113) made this pull request unmergeable. Please resolve the merge conflicts. |
|
ping from triage @eddyb any updates? you have conflicts to resolve |
|
Regarding #56278 (comment), the rust/src/librustc_mir/build/mod.rs Lines 628 to 640 in e4e032a |
2b546c4 to
b6055ef
Compare
…info_upvar_ops_sequence.
b6055ef to
c3ca9a3
Compare
|
@bors r=nikomatsakis |
|
📌 Commit c3ca9a3 has been approved by |
There was a problem hiding this comment.
Why isn't this checking is_user_variable?
There was a problem hiding this comment.
Oh, looks like is_user_variable is newer than this PR originally, and is actually part of the set of things I meant to review at some point.
…tsakis Future-proof MIR for dedicated debuginfo. This is rust-lang#56231 without the last commit (the one that actually moves to `VarDebuginfo`). Nothing should be broken, but it should no longer depend on debuginfo for anything else. r? @nikomatsakis
|
⌛ Testing commit c3ca9a3 with merge d101749a5366c81e052027e957d90b7430566438... |
…tsakis Future-proof MIR for dedicated debuginfo. This is rust-lang#56231 without the last commit (the one that actually moves to `VarDebuginfo`). Nothing should be broken, but it should no longer depend on debuginfo for anything else. r? @nikomatsakis
|
@bors retry |
Rollup of 5 pull requests Successful merges: - #56278 (Future-proof MIR for dedicated debuginfo.) - #59739 (Stabilize futures_api) - #59822 (Fix dark css rule) - #60186 (Temporarily accept [i|u][32|size] suffixes on a tuple index and warn) - #60190 (Don't generate unnecessary rmeta files.) Failed merges: r? @ghost
This is #56231 without the last commit (the one that actually moves to
VarDebuginfo).Nothing should be broken, but it should no longer depend on debuginfo for anything else.
r? @nikomatsakis