2018-05-22 18:01:09 -05:00
|
|
|
// run-rustfix
|
|
|
|
|
2022-05-20 20:06:44 -05:00
|
|
|
#![feature(rust_2018_preview)]
|
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 {
|
2022-05-20 20:06:44 -05:00
|
|
|
pub(crate) trait Foo {
|
2018-05-22 18:01:09 -05:00
|
|
|
type Bar;
|
|
|
|
}
|
|
|
|
|
2022-05-20 20:06:44 -05:00
|
|
|
pub(crate) struct Baz {}
|
2018-05-22 18:01:09 -05:00
|
|
|
|
|
|
|
impl Foo for Baz {
|
|
|
|
type Bar = ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _: <foo::Baz as crate::foo::Foo>::Bar = ();
|
|
|
|
//~^ ERROR absolute paths must start with
|
2023-04-03 16:41:16 -05:00
|
|
|
//~| WARN this is accepted in the current edition
|
|
|
|
//~| ERROR absolute paths must start with
|
|
|
|
//~| WARN this is accepted in the current edition
|
2018-05-22 18:01:09 -05:00
|
|
|
|
|
|
|
let _: <crate::foo::Baz as foo::Foo>::Bar = ();
|
|
|
|
//~^ ERROR absolute paths must start with
|
2023-04-03 16:41:16 -05:00
|
|
|
//~| WARN this is accepted in the current edition
|
2018-05-22 18:01:09 -05:00
|
|
|
}
|