-
Couldn't load subscription status.
- Fork 13.9k
Replace (Body, DefId) with Body where possible
#77552
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
Conversation
|
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
|
r? @lcnr (if you have the time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was incorrect. It should be checking the callee, not the caller. Really, it should just be removed entirely, since panicking in a const-context is still unstable and there's no need to promote diverging function calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
A `Body` now contains its `MirSource`, which in turn contains the `DefId` of the item associated with the `Body`.
bd374d5 to
52484c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fn do_mir_borrowck still takes a def
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a rather big improvement imo 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
Thanks, might be prone to merge conflicts @bors r+ rollup=iffy |
|
📌 Commit 04a94ab has been approved by |
|
☀️ Test successful - checks-actions, checks-azure |
Follow-up to #77430.
I
grep-ed for parameter lists in which aBodyappeared within a few lines of aDefId, so it's possible that I missed some cases, but this should be pretty complete. Most of these changes were mechanical, but there's a few places where I started calling things "caller" and "callee" when multipleDefIds were in-scope at once. Also, we should probably have a helper function onBodythat returns aLocalDefId. I can do that in this PR or in a follow-up.