-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Identify anonymous lifetimes by their DefId in HIR. #94773
Conversation
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
@@ -136,13 +136,13 @@ struct LoweringContext<'a, 'hir: 'a> { | |||
/// (i.e., it doesn't appear in the in_scope_lifetimes list), it is added | |||
/// to this list. The results of this list are then added to the list of | |||
/// lifetime definitions in the corresponding impl or function generics. | |||
lifetimes_to_define: Vec<(Span, ParamName)>, | |||
lifetimes_to_define: Vec<(Span, NodeId)>, | |||
|
|||
/// `true` if in-band lifetimes are being collected. This is used to |
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.
Please update the docs to reflect what the field's value now means
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 06122c00d51910c4b15cb514245b11def5038406 with merge 1a6c9b6b9600eb7e14a1cce6d8c23d8f916c322f... |
☀️ Try build successful - checks-actions |
Queued 1a6c9b6b9600eb7e14a1cce6d8c23d8f916c322f with parent ba14a83, future comparison URL. |
Finished benchmarking commit (1a6c9b6b9600eb7e14a1cce6d8c23d8f916c322f): comparison url. Summary: This benchmark run did not return any relevant results. 5 results were found to be statistically significant but too small to be relevant. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking 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 led to changes in compiler perf. @bors rollup=never |
r=me with docs updated |
06122c0
to
c8c691f
Compare
@bors r=oli-obk |
📌 Commit c8c691f has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (3f58828): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
ParamName::Fresh
currently identifies anonymous lifetimes by anusize
index computed from the number of lifetimes in scope. This makes the behaviour of lowering dependent on the contents of the surrounding item in unpredictable ways.This PR replaces this index by the
LocalDefId
of the synthetized generic lifetime parameter. This makes obvious which parameter the lifetime corresponds to.