]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
Rollup merge of #62351 - RalfJung:drop-in-place, r=cramertj
[rust.git] / src / test / ui / rust-2018 / edition-lint-fully-qualified-paths.fixed
1 // run-rustfix
2
3 #![feature(rust_2018_preview, crate_visibility_modifier)]
4 #![deny(absolute_paths_not_starting_with_crate)]
5
6 mod 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
19 fn 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 }