fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

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