2018-05-22 18:01:09 -05:00
|
|
|
// run-rustfix
|
|
|
|
|
2018-09-06 11:47:41 -05:00
|
|
|
#![feature(rust_2018_preview, crate_visibility_modifier)]
|
2018-05-18 17:13:53 -05:00
|
|
|
#![deny(absolute_paths_not_starting_with_crate)]
|
2018-05-22 18:01:09 -05:00
|
|
|
|
|
|
|
mod foo {
|
|
|
|
crate trait Foo {
|
|
|
|
type Bar;
|
|
|
|
}
|
|
|
|
|
|
|
|
crate struct Baz { }
|
|
|
|
|
|
|
|
impl Foo for Baz {
|
|
|
|
type Bar = ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _: <foo::Baz as ::foo::Foo>::Bar = ();
|
|
|
|
//~^ ERROR absolute paths must start with
|
2021-06-15 10:16:21 -05:00
|
|
|
//~| this is valid in the current edition
|
2018-05-22 18:01:09 -05:00
|
|
|
|
|
|
|
let _: <::foo::Baz as foo::Foo>::Bar = ();
|
|
|
|
//~^ ERROR absolute paths must start with
|
2021-06-15 10:16:21 -05:00
|
|
|
//~| this is valid in the current edition
|
2018-05-22 18:01:09 -05:00
|
|
|
}
|