]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/use-redundant.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / use-redundant.rs
1 // check-pass
2 #![warn(unused_imports)]
3
4 use crate::foo::Bar;
5
6 mod foo {
7     pub type Bar = i32;
8 }
9
10 fn baz() -> Bar {
11     3
12 }
13
14 mod m1 { pub struct S {} }
15 mod m2 { pub struct S {} }
16
17 use m1::*; //~ WARNING unused import
18 use m2::*; //~ WARNING unused import
19
20 fn main() {
21     use crate::foo::Bar; //~ WARNING imported redundantly
22     let _a: Bar = 3;
23     baz();
24
25     use m1::S;
26     let _s = S {};
27 }