-
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
Lint for unused lifetime parameters #9445
Comments
cc me |
Triage: This is even more important given lifetime elision - we should warn when lifetimes are included that could be elided, not just when they aren't used. |
I disagree about elision. It's very reasonable to include explicit lifetimes for clarity or to be 100% sure that |
I agree with @huonw. In Servo, where we have a lot of unsafe code, explicit lifetime parameters make things more understandable. The |
That seems like a perfectly reasonable approach. I'll make an issue for a new lint for elidable lifetimes. |
This is implemented as |
Don't lint `*_interior_mutable_const` on unions due to potential ICE. fixes rust-lang#9445 cc rust-lang#101113 This started ICE'ing sometime last month due to stricter UB checks. I'm not sure how we could check the value of a union as MIRI doesn't seem to store which field is currently active. changelog: Don't ICE on const unions containing a `!Freeze` type.
This code in borrow.rs could trip a warning about having unnecessary lifetime parameters:
The text was updated successfully, but these errors were encountered: