-
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
Resolve lifetimes independently for each item-like. #103530
Conversation
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 4ad85429855d6f207f26be17875001be114b224a with merge 0640c07a0d4002c0a8944b68e5c83774614e5dbf... |
☀️ Try build successful - checks-actions |
Queued 0640c07a0d4002c0a8944b68e5c83774614e5dbf with parent 85d089b, future comparison URL. |
Finished benchmarking commit (0640c07a0d4002c0a8944b68e5c83774614e5dbf): 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)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.
Footnotes |
4ad8542
to
be610d0
Compare
This comment has been minimized.
This comment has been minimized.
be610d0
to
ad00b24
Compare
error: implementation of `Bar` is not general enough | ||
--> $DIR/nested-rpit-hrtb.rs:51:93 | ||
| | ||
LL | fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'b> {} | ||
| ^^ implementation of `Bar` is not general enough | ||
| | ||
= note: `()` must implement `Bar<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Bar<'1>`, for some specific lifetime `'1` |
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.
Can we do something to point at the return type here? Maybe special case functions that have no tail expression nor return statement?
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.
The code changes overall look fine, but I had a bunch of questions.
ad00b24
to
60892e8
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (825f8ed): 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.
|
…ebank Resolve lifetimes independently for each item-like. Now that the heavy-lifting is done on the AST and during lowering, we do not need to perform HIR lifetime resolution on a full item at once. Instead, we can treat each item-like independently, and look at `generics_of` the parent exceptionally for associated items.
Now that the heavy-lifting is done on the AST and during lowering, we do not need to perform HIR lifetime resolution on a full item at once. Instead, we can treat each item-like independently, and look at
generics_of
the parent exceptionally for associated items.