Regression on nightly: unused pub(crate) use::*; is not actually unused #152004
Copy link
Copy link
Closed
Closed
Copy link
Labels
C-bugCategory: This is a bug.Category: This is a bug.L-unused_importsLint: unused_importsLint: unused_importsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I encountered this while trying to bump Rust from nightly-2026-01-09 to nightly-2026-02-01 in Polars. The CI complains:
error: unused import: `polars_plan::prelude`
--> crates/polars-lazy/src/prelude.rs:17:16
|
17 | pub(crate) use polars_plan::prelude::*;
| ^^^^^^^^^^^^^^^^^^^^
However, this is a false positive, if one removes this line of code the crate fails to compile.
I briefly tried to re-create a minimal example that has the same issue but was unable to.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.L-unused_importsLint: unused_importsLint: unused_importsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Activity
[-]Regression on nightly: unused pub(crate) use is not actually unused[/-][+]Regression on nightly: unused pub(crate) use::*; is not actually unused[/+]ehuss commentedon Feb 2, 2026
Bisecting leads me to believe this is related to #150502 and #150939. The unused warning starts after #150939.
cc @petrochenkov
petrochenkov commentedon Feb 3, 2026
Minimized:
This is caused by 227e7bd.
I'll fix this issue (and probably #151124 as well) as a part of extending the
ambiguous_import_visibilitieslint to glob-vs-glob ambiguities.eggyal commentedon Feb 3, 2026
rustbot commentedon Feb 3, 2026
eggyal commentedon Feb 3, 2026
@rustbot label -regression-from-stable-to-nightly -E-needs-mcve
petrochenkov commentedon Feb 11, 2026
Fixed in #152498.
Rollup merge of rust-lang#152498 - petrochenkov:revoverglob, r=jieyouxu
Rollup merge of rust-lang#152498 - petrochenkov:revoverglob, r=jieyouxu
Unrolled build for #152498