Static AMBIGUOUS_GLOB_IMPORTS
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
ⓘ
#![deny(ambiguous_glob_imports)]
pub fn foo() -> u32 {
use sub::*;
C
}
mod sub {
mod mod1 { pub const C: u32 = 1; }
mod mod2 { pub const C: u32 = 2; }
pub use mod1::*;
pub use mod2::*;
}
{{produces}}
§Explanation
Previous versions of Rust compile it successfully because it
had lost the ambiguity error when resolve use sub::mod2::*
.
This is a future-incompatible lint to transition this to a hard error in the future.