]> git.proxmox.com Git - rustc.git/blob - src/test/ui/rust-2018/edition-lint-nested-paths.fixed
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / rust-2018 / edition-lint-nested-paths.fixed
1 // run-rustfix
2
3 #![feature(rust_2018_preview, crate_visibility_modifier)]
4 #![deny(absolute_paths_not_starting_with_crate)]
5
6 use crate::foo::{a, b};
7 //~^ ERROR absolute paths must start with
8 //~| this is accepted in the current edition
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 crate::foo::{self as x, c};
22 //~^ ERROR absolute paths must start with
23 //~| this is accepted in the current edition
24 x::a();
25 c();
26 }
27 }