-
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
"warning: unnecessary lifetime parameter" unsilenceable lint #96956
"warning: unnecessary lifetime parameter" unsilenceable lint #96956
Comments
@rustbot modify labels +regresson-from-stable-to-nightly |
Error: Label regresson-from-stable-to-nightly can only be set by Rust team members Please let |
This comment was marked as off-topic.
This comment was marked as off-topic.
This is not a clippy lint. It is being emitted, here, by rustc:
The situation is confusing because there is (or was?) also a clippy lint for this; I think this may have been promoted into rustc but something was done wrong there. I have rechecked and:
@rust-lang/release could you please set the |
@rustbot ping rust-lang/release |
Error: Only Rust team members can ping teams. Please let |
@rustbot modify labels +regression-untriaged |
Ah! Looking at the "Regression" bug template gave me a hint. |
Ahh, I see. I was testing on stable, my bad. |
bisected the regression (with searched nightlies: from nightly-2022-02-01 to nightly-2022-06-07 bisected with cargo-bisect-rustc v0.6.1Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start=2022-02-01 --script=./test.sh |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-medium |
#93803 made this warning more precise, so it triggers more often. Steps:
|
@rustbot claim |
I really apologize for this, I'm mostly busy with life and can't really find the time for working on this, feel free to pick it 💜 |
@rustbot claim |
PR was closed due to inactivity, feel free to claim it again. @rustbot release-assignment |
@rustbot claim |
…bank Convert a hard-warning about named static lifetimes into lint "unused_lifetimes" Fixes rust-lang#96956. Some changes are ported from rust-lang#98079, thanks to jeremydavis519. r? `@estebank` `@petrochenkov` Any feedback is appreciated! ## Actions - [x] resolve conflicts - [x] fix build - [x] address review comments in last pr - [x] update tests
Given the following code:
The current output is:
Ideally the output should also say something like this:
And of course then
#[allow(needless_lifetimes)]
ought to work.Versions affected
The example code is accepted without any complaint by stable and beta, However, in both stable and beta, clippy has the same weird name-less complaint. And saying
#![allow(clippy::needless_lifetimes)]
doesn't suppress the message.I searched for "lifetime" in the clippy lints db. Of those that came up,
needless_lifetimes
andredundant_static_lifetimes
seemed like they might be it, but neither of those suppresses the lint on stable's clippy.The text was updated successfully, but these errors were encountered: