os-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
456 B
Rust
Raw Normal View History

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::*}, *};
2024-04-15 18:07:22 +00:00
//~^ ERROR unused imports: `*`, `Foo`, `baz::{}`, and `foobar::*`
2018-01-24 23:32:17 +01:00
use foo::bar::baz::{*, *};
//~^ ERROR unused import: `*`
use foo::{};
2018-12-09 17:40:49 +01:00
//~^ ERROR unused import: `foo::{}`
fn main() {
let _: Bar;
}