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