-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Impls and impl items inherit lint levels of the corresponding traits and trait items #144113
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
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.
This behavior seems really non-local and pretty broad. #[allow(dead_code)]
on a trait definition suppresses all dead code warnings in all impls with this change?
7eba1f1
to
7a9e2e2
Compare
@compiler-errors yes, and I think this makes sense. We would have only one trait definition but many impls, letting |
I tried reassigning, but rustbot didn’t respond after waiting a while, so I deleted the comment. 😂 |
☔ The latest upstream changes (presumably #144863) made this pull request unmergeable. Please resolve the merge conflicts. |
7a9e2e2
to
c1be949
Compare
https://github.com/rust-lang/rust/blob/master/compiler/rustc_passes/src/dead.rs#L360-L361 won't insert assoc items into the live set, so that impl items cannot be marked live.
This PR lets impls and impl items can inherit lint levels of the corresponding traits and trait items.
Fixes #144060
r? @petrochenkov