Skip to content

Regression on nightly: unused pub(crate) use::*; is not actually unused #152004

@orlp

Description

@orlp

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

No one assigned

    Labels

    C-bugCategory: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.L-unused_importsLint: unused_importsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions