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
Add REDUNDANT_IMPORTS
lint for new redundant import detection
#123813
base: master
Are you sure you want to change the base?
Conversation
nominating for T-lang to see if we'd like to keep this as allow or make it warn, etc., and perhaps to follow-up on the policy. for the record, I think this lint is perhaps noisy but also very useful, so I'd like to see it at Warn level eventually. just not curious what the best rollout strategy is for that. |
1ed0bee
to
ddb8dda
Compare
ddb8dda
to
114154c
Compare
The job Click to see the possible cause of the failure (guessed by this bot)
|
@@ -419,6 +420,29 @@ declare_lint! { | |||
"imports that are never used" | |||
} | |||
|
|||
declare_lint! { | |||
/// The `unused_imports` lint detects imports that are redundant due to being |
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.
*redundant_imports
@rustbot labels -I-lang-nominated We discussed this in the lang meeting today. We came to the consensus that we want to split out into a separate There are two reasons for this. One, and most importantly, is that if we were to not do this, a Two is that not doing this would make it annoying to migrate away from a glob import incrementally. Once this case is separated out, we're OK with the remainder of this lint going directly to |
Defaults to Allow for now. Stacked on #123744 to avoid merge conflict, but much easier to review all as one.
r? petrochenkov