]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / ui / rust-2018 / extern-crate-idiomatic-in-2018.fixed
CommitLineData
94b46f34
XL
1// aux-build:edition-lint-paths.rs
2// run-rustfix
b7449926
XL
3// compile-flags:--extern edition_lint_paths
4// edition:2018
94b46f34
XL
5
6// The "normal case". Ideally we would remove the `extern crate` here,
7// but we don't.
8
94b46f34
XL
9#![deny(rust_2018_idioms)]
10#![allow(dead_code)]
11
12
13//~^ ERROR unused extern crate
14
15use edition_lint_paths as bar;
16//~^ ERROR `extern crate` is not idiomatic in the new edition
17
18fn main() {
19 // This is not considered to *use* the `extern crate` in Rust 2018:
20 use edition_lint_paths::foo;
21 foo();
22
23 // But this should be a use of the (renamed) crate:
24 crate::bar::foo();
25}
26