fork/rust

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

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

master
663 B28 linesraw
1// run-rustfix
2
3#![feature(rust_2018_preview)]
4#![deny(absolute_paths_not_starting_with_crate)]
5
6mod foo {
7    pub(crate) trait Foo {
8        type Bar;
9    }
10
11    pub(crate) struct Baz {}
12
13    impl Foo for Baz {
14        type Bar = ();
15    }
16}
17
18fn main() {
19    let _: <foo::Baz as crate::foo::Foo>::Bar = ();
20    //~^ ERROR absolute paths must start with
21    //~| WARN this is accepted in the current edition
22    //~| ERROR absolute paths must start with
23    //~| WARN this is accepted in the current edition
24
25    let _: <crate::foo::Baz as foo::Foo>::Bar = ();
26    //~^ ERROR absolute paths must start with
27    //~| WARN this is accepted in the current edition
28}