]> git.lizzy.rs Git - rust.git/blob - tests/ui/rust-2018/edition-lint-nested-paths.rs
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
[rust.git] / tests / ui / rust-2018 / edition-lint-nested-paths.rs
1 // run-rustfix
2
3 #![feature(rust_2018_preview)]
4 #![deny(absolute_paths_not_starting_with_crate)]
5
6 use foo::{a, b};
7 //~^ ERROR absolute paths must start with
8 //~| this is accepted in the current edition
9 //~| ERROR absolute paths must start with
10 //~| this is accepted in the current edition
11
12 mod foo {
13     pub(crate) fn a() {}
14     pub(crate) fn b() {}
15     pub(crate) fn c() {}
16 }
17
18 fn main() {
19     a();
20     b();
21
22     {
23         use foo::{self as x, c};
24         //~^ ERROR absolute paths must start with
25         //~| this is accepted in the current edition
26         //~| ERROR absolute paths must start with
27         //~| this is accepted in the current edition
28         x::a();
29         c();
30     }
31 }