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