]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / rust-2018 / edition-lint-fully-qualified-paths.rs
CommitLineData
94b46f34
XL
1// run-rustfix
2
923072b8 3#![feature(rust_2018_preview)]
83c7162d 4#![deny(absolute_paths_not_starting_with_crate)]
83c7162d 5
94b46f34 6mod foo {
923072b8 7 pub(crate) trait Foo {
94b46f34
XL
8 type Bar;
9 }
83c7162d 10
923072b8 11 pub(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}