-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
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. |
ddb8dda
to
114154c
Compare
This comment has been minimized.
This comment has been minimized.
@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 |
Let's first land the renaming and the warn -> allow change, and then change the lint logic itself. |
114154c
to
1ff647b
Compare
OK, I fixed the one nit. Haven't split/suppressed the glob behavior. I can open an issue to do that later. @rustbot ready |
r=me with #123813 (comment) addressed. |
What the heck, I thought I literally fixed that. Sorry haha |
1ff647b
to
3d24966
Compare
This comment has been minimized.
This comment has been minimized.
3d24966
to
aecf65f
Compare
This comment has been minimized.
This comment has been minimized.
aecf65f
to
7dcf3a4
Compare
This comment has been minimized.
This comment has been minimized.
7dcf3a4
to
f6f587e
Compare
@bors r+ |
…petrochenkov Add `REDUNDANT_IMPORTS` lint for new redundant import detection Defaults to Allow for now. Stacked on rust-lang#123744 to avoid merge conflict, but much easier to review all as one. r? petrochenkov
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#123813 (Add `REDUNDANT_IMPORTS` lint for new redundant import detection) - rust-lang#127159 (match lowering: Hide `Candidate` from outside the lowering algorithm) - rust-lang#128162 (Cleanup sys module to match house style) - rust-lang#128296 (Update target-spec metadata for loongarch64 targets) - rust-lang#128417 (Add `f16` and `f128` math functions) - rust-lang#128431 (Add myself as VxWorks target maintainer for reference) - rust-lang#128437 (improve bootstrap to allow selecting llvm tools individually) r? `@ghost` `@rustbot` modify labels: rollup
…petrochenkov Add `REDUNDANT_IMPORTS` lint for new redundant import detection Defaults to Allow for now. Stacked on rust-lang#123744 to avoid merge conflict, but much easier to review all as one. r? petrochenkov
Rollup of 7 pull requests Successful merges: - rust-lang#117468 (Stabilize Wasm relaxed SIMD) - rust-lang#123813 (Add `REDUNDANT_IMPORTS` lint for new redundant import detection) - rust-lang#127060 (Migrate `symbol-visibility` `run-make` test to rmake) - rust-lang#127159 (match lowering: Hide `Candidate` from outside the lowering algorithm) - rust-lang#128296 (Update target-spec metadata for loongarch64 targets) - rust-lang#128416 (android: Remove libstd hacks for unsupported Android APIs) - rust-lang#128431 (Add myself as VxWorks target maintainer for reference) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#123813 (Add `REDUNDANT_IMPORTS` lint for new redundant import detection) - rust-lang#126697 ([RFC] mbe: consider the `_` in 2024 an expression) - rust-lang#127159 (match lowering: Hide `Candidate` from outside the lowering algorithm) - rust-lang#128244 (Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck, remove some hacks) - rust-lang#128431 (Add myself as VxWorks target maintainer for reference) - rust-lang#128438 (Add special-case for [T, 0] in dropck_outlives) - rust-lang#128457 (Fix docs for OnceLock::get_mut_or_init) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#123813 (Add `REDUNDANT_IMPORTS` lint for new redundant import detection) - rust-lang#126697 ([RFC] mbe: consider the `_` in 2024 an expression) - rust-lang#127159 (match lowering: Hide `Candidate` from outside the lowering algorithm) - rust-lang#128244 (Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck, remove some hacks) - rust-lang#128431 (Add myself as VxWorks target maintainer for reference) - rust-lang#128438 (Add special-case for [T, 0] in dropck_outlives) - rust-lang#128457 (Fix docs for OnceLock::get_mut_or_init) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123813 - compiler-errors:redundant-lint, r=petrochenkov Add `REDUNDANT_IMPORTS` lint for new redundant import detection Defaults to Allow for now. Stacked on rust-lang#123744 to avoid merge conflict, but much easier to review all as one. r? petrochenkov
Defaults to Allow for now. Stacked on #123744 to avoid merge conflict, but much easier to review all as one.
r? petrochenkov