rust/tests/ui/lint/use-redundant/use-redundant-glob-parent.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

17 lines
240 B
Rust

// check-pass
#![warn(unused_imports)]
pub mod bar {
pub struct Foo(pub Bar);
pub struct Bar(pub char);
}
use bar::*;
pub fn warning() -> Foo {
use bar::Foo; //~ WARNING imported redundantly
Foo(Bar('a'))
}
fn main() {}