2018-05-22 10:45:44 -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 10:45:44 -05:00
|
|
|
|
|
|
|
use foo::{a, b};
|
|
|
|
//~^ ERROR absolute paths must start with
|
2021-06-16 07:27:44 -05:00
|
|
|
//~| this is accepted in the current edition
|
2022-01-23 16:05:48 -06:00
|
|
|
//~| ERROR absolute paths must start with
|
|
|
|
//~| this is accepted in the current edition
|
2018-05-22 10:45:44 -05:00
|
|
|
|
|
|
|
mod foo {
|
2022-05-20 20:06:44 -05:00
|
|
|
pub(crate) fn a() {}
|
|
|
|
pub(crate) fn b() {}
|
|
|
|
pub(crate) fn c() {}
|
2018-05-22 10:45:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
a();
|
|
|
|
b();
|
2018-05-22 17:34:30 -05:00
|
|
|
|
|
|
|
{
|
|
|
|
use foo::{self as x, c};
|
|
|
|
//~^ ERROR absolute paths must start with
|
2021-06-16 07:27:44 -05:00
|
|
|
//~| this is accepted in the current edition
|
2022-01-23 16:05:48 -06:00
|
|
|
//~| ERROR absolute paths must start with
|
|
|
|
//~| this is accepted in the current edition
|
2018-05-22 17:34:30 -05:00
|
|
|
x::a();
|
|
|
|
c();
|
|
|
|
}
|
2018-05-22 10:45:44 -05:00
|
|
|
}
|