-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Make opaque types regular HIR nodes #129244
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @michaelwoerister. Use |
HIR ty lowering was modified cc @fmease Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
tests/ui/async-await/multiple-lifetimes/ret-impl-trait-one.stderr
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
fn visit_opaque_ty(&mut self, opaq: &'hir OpaqueTy<'hir>) { | ||
self.insert(opaq.span, opaq.hir_id, Node::OpaqueTy(opaq)); | ||
|
||
self.with_parent(opaq.hir_id, |this| { |
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 still creates a mismatch between HirId and DefId parenting.
The opaque's HirId
is included into the parenting chain here, but its corresponding DefId
is not included because it is created late.
Ignoring all the ID parenting questions, the change looks reasonable to me because
Regarding DefIds, HirIds and parenting, the change is not strictly necessary (#129023 (comment)) to fix the HIR ownership issues, and I'd like to discuss that topic separately (see my other messages in #129023). |
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
Until I fix clippy: |
This comment has been minimized.
This comment has been minimized.
Make opaque types regular HIR nodes Having opaque types as HIR owner introduces all sorts of complications. This PR proposes to make them regular HIR nodes instead. I haven't gone through all the test changes yet, so there may be a few surprises. Many thanks to `@camelid` for the first draft. Fixes rust-lang#129023 Fixes rust-lang#129099 Fixes rust-lang#125843 Fixes rust-lang#119716 Fixes rust-lang#121422
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (b64686e): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary -2.0%, secondary 2.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary -5.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (secondary 0.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 749.145s -> 754.024s (0.65%) |
☔ The latest upstream changes (presumably #129443) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #129540) made this pull request unmergeable. Please resolve the merge conflicts. |
This introduce an additional collection of opaques on HIR, as they can no longer be listed using the free item list.
☔ The latest upstream changes (presumably #126161) made this pull request unmergeable. Please resolve the merge conflicts. |
Having opaque types as HIR owner introduces all sorts of complications. This PR proposes to make them regular HIR nodes instead.
I haven't gone through all the test changes yet, so there may be a few surprises.
Many thanks to @camelid for the first draft.
Fixes #129023
Fixes #129099
Fixes #125843
Fixes #119716
Fixes #121422