-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
needless_lifetimes
: ignore lifetimes in explicit self types
#8278
needless_lifetimes
: ignore lifetimes in explicit self types
#8278
Conversation
r? @xFrednet (rust-highfive has picked a reviewer for you, use r? to override) |
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.
Looks good to me, I only have one NIT related to the .stderr
file. Then it's ready to be merged. 🙃
BTW, if you work on an issue you can also assign yourself with @rustbot claim
that indicates that you're working on it and ensures that nobody else claims it.
Also, thank you for your patience, it sadly took some time until I could review this. :)
47e45ed
to
9ef6e21
Compare
Thanks! re: No problem at all about the time, I'd say a week is still pretty quick |
Okay, just wanted to make sure you're aware of that, even if I believe you are. With smaller fixes, it also usually doesn't matter. In the last year, I think we only had one instance were two contributors collided in this regard 🙃 |
Looks good to me, thank you for the fix and quick response! @bors r+ |
📌 Commit 9ef6e21 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Commit 9ef6e21 introduced a check to ensure that Clippy doesn't consider a lifetime present in an explicit self types as being the default for an elided output lifetime. For example, elision did not work in the case like: ```rust fn func(self: &Rc<Self>, &str) -> &str { … } ``` Since Rust 1.81.0, the lifetime in the self type is now considered the default for elision. Elision should then be suggested when appropriate. changelog: [`needless_lifetimes`]: suggest elision of lifetimes present in explicit self types as well r? @Alexendoo because of #8278
changelog: false positive fix: [
needless_lifetimes
] no longer lints lifetimes in explicit self typesThey're not currently elidable (rust-lang/rust#69064)
Fixes #7296