Static rustc_lint_defs::builtin::AMBIGUOUS_GLOB_IMPORTS

source ·
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.


pub fn foo() -> u32 {
    use sub::*;

mod sub {
    mod mod1 { pub const C: u32 = 1; }
    mod mod2 { pub const C: u32 = 2; }

    pub use mod1::*;
    pub use mod2::*;



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.