]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs
Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgr
[rust.git] / src / test / ui / rust-2018 / edition-lint-fully-qualified-paths.rs
1 // run-rustfix
2
3 #![feature(rust_2018_preview)]
4 #![deny(absolute_paths_not_starting_with_crate)]
5
6 mod 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
18 fn main() {
19     let _: <foo::Baz as ::foo::Foo>::Bar = ();
20     //~^ ERROR absolute paths must start with
21     //~| this is accepted in the current edition
22
23     let _: <::foo::Baz as foo::Foo>::Bar = ();
24     //~^ ERROR absolute paths must start with
25     //~| this is accepted in the current edition
26 }