]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rust-2018/edition-lint-nested-paths.rs
Auto merge of #57925 - fintelia:riscv-cas, r=nagisa
[rust.git] / src / test / ui / rust-2018 / edition-lint-nested-paths.rs
1 // run-rustfix
2
3 #![feature(rust_2018_preview, crate_visibility_modifier)]
4 #![deny(absolute_paths_not_starting_with_crate)]
5
6 use foo::{a, b};
7 //~^ ERROR absolute paths must start with
8 //~| this was previously accepted
9
10 mod foo {
11     crate fn a() {}
12     crate fn b() {}
13     crate fn c() {}
14 }
15
16 fn main() {
17     a();
18     b();
19
20     {
21         use foo::{self as x, c};
22         //~^ ERROR absolute paths must start with
23         //~| this was previously accepted
24         x::a();
25         c();
26     }
27 }