rust/tests/ui/imports/unused.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
437 B
Rust
Raw Normal View History

2016-09-05 00:10:50 -05:00
#![deny(unused)]
mod foo {
fn f() {}
mod m1 {
pub(super) use super::f; //~ ERROR unused
}
mod m2 {
#[allow(unused)]
use super::m1::*; // (despite this glob import)
}
mod m3 {
pub(super) use super::f; // Check that this is counted as used (cf. issue #36249).
2016-09-05 00:10:50 -05:00
}
pub mod m4 {
use super::m3::*;
pub fn g() { f(); }
}
}
fn main() {
foo::m4::g();
}