fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1// aux-build:edition-lint-paths.rs 2// run-rustfix 3 4// Oddball: extern crate appears in a submodule, making it harder for 5// us to rewrite paths. We don't (and we leave the `extern crate` in 6// place). 7 8#![feature(rust_2018_preview)] 9#![deny(absolute_paths_not_starting_with_crate)] 10 11mod m { 12 // Because this extern crate does not appear at the root, we 13 // ignore it altogether. 14 pub extern crate edition_lint_paths; 15} 16 17// And we don't being smart about paths like this, even though you 18// *could* rewrite it to `use edition_lint_paths::foo` 19use crate::m::edition_lint_paths::foo; 20//~^ ERROR absolute paths must start 21//~| WARNING this was previously accepted 22 23fn main() { 24 foo(); 25}