1 // aux-build:edition-lint-paths.rs
3 // compile-flags:--extern edition_lint_paths
6 // The "normal case". Ideally we would remove the `extern crate` here,
9 #![deny(rust_2018_idioms)]
13 //~^ ERROR unused extern crate
15 // Shouldn't suggest changing to `use`, as `bar`
16 // would no longer be added to the prelude which could cause
17 // compilation errors for imports that use `bar` in other
18 // modules. See #57672.
19 extern crate edition_lint_paths as bar;
22 // This is not considered to *use* the `extern crate` in Rust 2018:
23 use edition_lint_paths::foo;
26 // But this should be a use of the (renamed) crate: