2020-01-22 18:00:00 -06:00
|
|
|
// check-pass
|
2019-03-17 05:38:38 -05:00
|
|
|
#![warn(unused_imports)]
|
2019-02-22 08:07:18 -06:00
|
|
|
|
2019-10-23 19:00:00 -05:00
|
|
|
use crate::foo::Bar;
|
2019-02-22 08:07:18 -06:00
|
|
|
|
|
|
|
mod foo {
|
|
|
|
pub type Bar = i32;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn baz() -> Bar {
|
|
|
|
3
|
|
|
|
}
|
|
|
|
|
2019-03-17 05:55:32 -05:00
|
|
|
mod m1 { pub struct S {} }
|
|
|
|
mod m2 { pub struct S {} }
|
|
|
|
|
2019-10-23 19:00:00 -05:00
|
|
|
use m1::*; //~ WARNING unused import
|
|
|
|
use m2::*; //~ WARNING unused import
|
2019-03-17 05:55:32 -05:00
|
|
|
|
2019-02-22 08:07:18 -06:00
|
|
|
fn main() {
|
2019-10-23 19:00:00 -05:00
|
|
|
use crate::foo::Bar; //~ WARNING imported redundantly
|
2019-02-22 08:07:18 -06:00
|
|
|
let _a: Bar = 3;
|
|
|
|
baz();
|
2019-03-17 05:55:32 -05:00
|
|
|
|
2019-10-23 19:00:00 -05:00
|
|
|
use m1::S;
|
2019-03-17 05:55:32 -05:00
|
|
|
let _s = S {};
|
2019-02-22 08:07:18 -06:00
|
|
|
}
|