1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// 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() {}