rust/tests/ui/lint/use-redundant/issue-92904.rs
Michael Howell 000e94e67d diagnostics: account for glob shadowing when linting redundant imports
Co-Authored-By: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2023-04-01 11:11:21 -07:00

18 lines
253 B
Rust

// check-pass
pub struct Foo(bar::Bar);
pub mod bar {
pub struct Foo(pub Bar);
pub struct Bar(pub char);
}
pub fn warning() -> Foo {
use bar::*;
#[deny(unused_imports)]
use self::Foo; // no error
Foo(Bar('a'))
}
fn main() {}