-
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
Split needless_lifetime
'_
suggestions into elidable_lifetime_names
#13960
base: master
Are you sure you want to change the base?
Conversation
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.
I like this lint splitting, I'm just not sure about the category to use for the new lint.
/// ``` | ||
#[clippy::version = "1.84.0"] | ||
pub ELIDABLE_LIFETIME_NAMES, | ||
pedantic, |
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.
This PR does two things at once: it not only splits the lint, but also moves part of it from complexity
to pedantic
. Since people would be able to silence the elidable_lifetime_names
, shouldn't it stay into complexity
?
My rationale is that an unused variable will get flagged if it doesn't start with _
, why shouldn't we continue to do the same with unused lifetimes?
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.
Since a good number of people want to silence it we generally take that as an indicator that it should be moved into pedantic
I don't think it's as severe as unused variables since the lifetimes are still used even though they could be elided
5b9427e
to
03ada72
Compare
03ada72
to
9d98207
Compare
Fixes #13514
changelog: Split [
needless_lifetime
] suggestions that use'_
into a new pedantic lint [elidable_lifetime_names
]