2018-05-22 10:45:44 -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 10:45:44 -05:00
|
|
|
|
|
|
|
use crate::foo::{a, b};
|
|
|
|
//~^ ERROR absolute paths must start with
|
|
|
|
//~| this was previously accepted
|
|
|
|
|
|
|
|
mod foo {
|
|
|
|
crate fn a() {}
|
|
|
|
crate fn b() {}
|
2018-05-22 17:34:30 -05:00
|
|
|
crate fn c() {}
|
2018-05-22 10:45:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
a();
|
|
|
|
b();
|
2018-05-22 17:34:30 -05:00
|
|
|
|
|
|
|
{
|
|
|
|
use crate::foo::{self as x, c};
|
|
|
|
//~^ ERROR absolute paths must start with
|
|
|
|
//~| this was previously accepted
|
|
|
|
x::a();
|
|
|
|
c();
|
|
|
|
}
|
2018-05-22 10:45:44 -05:00
|
|
|
}
|