-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Lint elided lifetimes in path during lifetime resolution. #90446
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
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.
Overall looks good. Didn't give this a super close read yet, but had some thoughts.
r? @jackh726 |
040a708
to
dd28f96
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit dd28f96 with merge 15577f9bb6cc47d19e4ab586f20ba64f7fe26b01... |
☀️ Try build successful - checks-actions |
Queued 15577f9bb6cc47d19e4ab586f20ba64f7fe26b01 with parent 6d246f0, future comparison URL. |
Finished benchmarking commit (15577f9bb6cc47d19e4ab586f20ba64f7fe26b01): comparison url. Summary: This change led to large relevant improvements 🎉 in compiler performance.
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 |
@jackh726 the variant with
|
I'm going to go ahead and say that I prefer #91271. Aside from wg-grammar opt, perf is pretty similar. I would attribute that to as maybe just noise. However, that PR looks much cleaner imo. That said, it does look like the "Probably a nicer way to do this would be to make new_implicit_lifetime just take a missing: bool arg" comment got missed in this PR but is present there. r=me on the variant PR once fmt done + CI green. Or r=me on this PR with above comment addressed. |
9df3e3c
to
5be3e1e
Compare
5be3e1e
to
aa2450f
Compare
@bors r=jackh726 |
📌 Commit aa2450f has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (76938d6): comparison url. Summary: This change led to large relevant improvements 🎉 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
The lifetime elision lint is known to be brittle and can be redundant with later lifetime resolution errors. This PR aims to remove the redundancy by performing the lint after lifetime resolution.
This PR proposes to carry the information that an elision should be linted against by using a special
LifetimeName
. I am not certain this is the best solution, but it is certainly the easiest.Fixes #60199
Fixes #55768
Fixes #63110
Fixes #71957