Skip to content

Incorrect hidden_glob_reexports warning #146164

@alrz

Description

@alrz

I tried this code:

// #[allow(hidden_glob_reexports)]
use ::core::option::Option;

I expected to see this happen: compile without warning.

Instead, this happened:

warning: name introduced by a private item shadows a name introduced by a public glob re-export which is not correct. we are importing the same type (to avoid conflict with another type with the same name).

Meta

rustc --version --verbose:

rustc 1.89.0 (29483883e 2025-08-04)
binary: rustc
commit-hash: 29483883eed69d5fb4db01964cdf2af4d86e9cb2
commit-date: 2025-08-04
host: x86_64-pc-windows-msvc
release: 1.89.0
LLVM version: 20.1.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.L-hidden_glob_reexportsLint: hidden_glob_reexportsS-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.T-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