rust/tests/ui/use/use-nested-groups-unused-imports.rs

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

25 lines
452 B
Rust
Raw Normal View History

2018-01-24 22:32:17 +00:00
#![allow(dead_code)]
#![deny(unused_imports)]
mod foo {
2018-01-24 22:32:17 +00:00
pub mod bar {
pub mod baz {
pub struct Bar();
}
pub mod foobar {}
}
pub struct Foo();
}
2018-01-24 22:32:17 +00:00
use foo::{Foo, bar::{baz::{}, foobar::*}, *};
//~^ ERROR unused imports: `*`, `Foo`, `baz::{}`, `foobar::*`
use foo::bar::baz::{*, *};
//~^ ERROR unused import: `*`
use foo::{};
2018-12-09 16:40:49 +00:00
//~^ ERROR unused import: `foo::{}`
fn main() {
let _: Bar;
}