Skip to main content

AMBIGUOUS_GLOB_IMPORTS

Static AMBIGUOUS_GLOB_IMPORTS 

Source
pub static AMBIGUOUS_GLOB_IMPORTS: &'static Lint
Expand description

The ambiguous_glob_imports lint detects glob imports that should report ambiguity errors, but previously didn’t do that due to rustc bugs.

§Example

// library crate `my_library`
mod mod1 { pub const C: u32 = 1; }
mod mod2 { pub const C: u32 = 2; }
pub use mod1::*;
pub use mod2::*;

// another crate using `my_library`
let c = my_library::C; // `C` is ambiguous

§Explanation

Previous versions of Rust compile it successfully because ambiguous glob imports weren’t preserved correctly over crate boundaries.

This is a future-incompatible lint to transition this to a hard error in the future.