summaryrefslogtreecommitdiffstats
path: root/tests/ui/use/use-nested-groups-unused-imports.rs
blob: ca6b8ba94d1cab407a85482ac1695aebbe843f4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#![allow(dead_code)]
#![deny(unused_imports)]

mod foo {
    pub mod bar {
        pub mod baz {
            pub struct Bar();
        }
        pub mod foobar {}
    }

    pub struct Foo();
}

use foo::{Foo, bar::{baz::{}, foobar::*}, *};
    //~^ ERROR unused imports: `*`, `Foo`, `baz::{}`, `foobar::*`
use foo::bar::baz::{*, *};
    //~^ ERROR unused import: `*`
use foo::{};
    //~^ ERROR unused import: `foo::{}`

fn main() {
    let _: Bar;
}