os-rust/src/test/ui/use/use-nested-groups-unused-imports.rs

26 lines
488 B
Rust
Raw Normal View History

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