fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
704 B31 linesraw
1// run-rustfix
2
3#![feature(rust_2018_preview)]
4#![deny(absolute_paths_not_starting_with_crate)]
5
6use crate::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
12mod foo {
13    pub(crate) fn a() {}
14    pub(crate) fn b() {}
15    pub(crate) fn c() {}
16}
17
18fn main() {
19    a();
20    b();
21
22    {
23        use crate::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}