]>
Commit | Line | Data |
---|---|---|
94b46f34 XL |
1 | // run-rustfix |
2 | ||
b7449926 | 3 | #![feature(rust_2018_preview, crate_visibility_modifier)] |
83c7162d | 4 | #![deny(absolute_paths_not_starting_with_crate)] |
83c7162d | 5 | |
94b46f34 XL |
6 | mod foo { |
7 | crate trait Foo { | |
8 | type Bar; | |
9 | } | |
83c7162d | 10 | |
136023e0 | 11 | crate struct Baz {} |
83c7162d | 12 | |
94b46f34 XL |
13 | impl Foo for Baz { |
14 | type Bar = (); | |
15 | } | |
83c7162d XL |
16 | } |
17 | ||
18 | fn main() { | |
94b46f34 XL |
19 | let _: <foo::Baz as crate::foo::Foo>::Bar = (); |
20 | //~^ ERROR absolute paths must start with | |
136023e0 | 21 | //~| this is accepted in the current edition |
94b46f34 XL |
22 | |
23 | let _: <crate::foo::Baz as foo::Foo>::Bar = (); | |
24 | //~^ ERROR absolute paths must start with | |
136023e0 | 25 | //~| this is accepted in the current edition |
83c7162d | 26 | } |