-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Capture lifetimes for associated type bounds destined to be lowered to opaques #115366
Capture lifetimes for associated type bounds destined to be lowered to opaques #115366
Conversation
r? @jackh726 (rustbot has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit f1679f7 with merge d270d1d991b419b84f01779b3588279d4ab60272... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
Finished benchmarking commit (d270d1d991b419b84f01779b3588279d4ab60272): comparison URL. Overall result: no relevant changes - 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 benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 631.943s -> 630.735s (-0.19%) |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (2f5df8a): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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 sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 630.392s -> 630.791s (0.06%) |
Some associated type bounds get lowered to opaques, but they're not represented in the AST as opaques.
That means that we never collect lifetimes for them (
record_lifetime_params_for_impl_trait
) which are used currently for RPITITs, which capture all of their in-scope lifetimes1. This means that the nested RPITITs that arise from some type likeimpl Foo<Type: Bar>
(~>impl Foo<Type = impl Bar>
) don't capture any lifetimes, leading to ICEs.This PR makes sure we collect the lifetimes for associated type bounds as well, and make sure that they are set up correctly for opaque type lowering later.
Fixes #115360
Footnotes
Make RPITITs capture all in-scope lifetimes #114489 ↩