]> git.lizzy.rs Git - rust.git/blob - tests/ui/rust-2018/edition-lint-nested-empty-paths.rs
Rollup merge of #106648 - Nilstrieb:poly-cleanup, r=compiler-errors
[rust.git] / tests / ui / rust-2018 / edition-lint-nested-empty-paths.rs
1 // run-rustfix
2
3 #![feature(rust_2018_preview)]
4 #![deny(absolute_paths_not_starting_with_crate)]
5 #![allow(unused_imports)]
6 #![allow(dead_code)]
7
8 pub(crate) mod foo {
9     pub(crate) mod bar {
10         pub(crate) mod baz { }
11         pub(crate) mod baz1 { }
12
13         pub(crate) struct XX;
14     }
15 }
16
17 use foo::{bar::{baz::{}}};
18 //~^ ERROR absolute paths must start with
19 //~| WARN this is accepted in the current edition
20
21 use foo::{bar::{XX, baz::{}}};
22 //~^ ERROR absolute paths must start with
23 //~| WARN this is accepted in the current edition
24 //~| ERROR absolute paths must start with
25 //~| WARN this is accepted in the current edition
26
27 use foo::{bar::{baz::{}, baz1::{}}};
28 //~^ ERROR absolute paths must start with
29 //~| WARN this is accepted in the current edition
30 //~| ERROR absolute paths must start with
31 //~| WARN this is accepted in the current edition
32
33 fn main() {
34 }