-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add label to lint for lifetimes used once #51697
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
Conversation
estebank
commented
Jun 22, 2018
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
r? @oli-obk Do you think it's worth making the removal a suggestion? It can get a little messy if the generics end up being empty afterwards, But since this is already an error, moving to another error seems fine, as long as the other error also has a suggestion |
@oli-obk I was thinking of doing that as a follow up, as getting the right span for the suggestion requires dealing with leading and trailing commas, as well as the empty <> case. We also have to account for the total lifetime count introduced by the scope signature to suggest |
@bors r+ Sgtm |
📌 Commit 973baaa has been approved by |
Add label to lint for lifetimes used once ``` error: lifetime parameter `'a` only used once --> $DIR/fn-types.rs:19:10 | LL | a: for<'a> fn(&'a u32), //~ ERROR `'a` only used once | ^^ -- ...is used only here | | | this lifetime... ```
☀️ Test successful - status-appveyor, status-travis |