]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / rust-2018 / edition-lint-fully-qualified-paths.rs
CommitLineData
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
6mod 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
18fn main() {
94b46f34
XL
19 let _: <foo::Baz as ::foo::Foo>::Bar = ();
20 //~^ ERROR absolute paths must start with
136023e0 21 //~| this is accepted in the current edition
94b46f34
XL
22
23 let _: <::foo::Baz as foo::Foo>::Bar = ();
24 //~^ ERROR absolute paths must start with
136023e0 25 //~| this is accepted in the current edition
83c7162d 26}