]> git.lizzy.rs Git - rust.git/blob - tests/ui/imports/unused.rs
Rollup merge of #107190 - fmease:fix-81698, r=compiler-errors
[rust.git] / tests / ui / imports / unused.rs
1 #![deny(unused)]
2
3 mod foo {
4     fn f() {}
5
6     mod m1 {
7         pub(super) use super::f; //~ ERROR unused
8     }
9
10     mod m2 {
11         #[allow(unused)]
12         use super::m1::*; // (despite this glob import)
13     }
14
15     mod m3 {
16         pub(super) use super::f; // Check that this is counted as used (cf. issue #36249).
17     }
18
19     pub mod m4 {
20         use super::m3::*;
21         pub fn g() { f(); }
22     }
23 }
24
25 fn main() {
26     foo::m4::g();
27 }