]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rust-2018/extern-crate-submod.fixed
Remove licenses
[rust.git] / src / test / ui / rust-2018 / extern-crate-submod.fixed
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
11 mod 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`
19 use crate::m::edition_lint_paths::foo;
20 //~^ ERROR absolute paths must start
21 //~| WARNING this was previously accepted
22
23 fn main() {
24     foo();
25 }
26