mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 13:46:03 +00:00

In this case, the exact extern crate isn't very important. This is part of the changes needed to address the spurious failures from a main test `../removing-extern-crate.rs` being both an auxiliary and a main test file, causing fs races due to multiple `rustc` processes in multiple test threads trying to build the main test file both as a main test and also as an auxiliary at around the same time.
18 lines
478 B
Rust
18 lines
478 B
Rust
//@ edition:2018
|
|
//@ aux-build: remove-extern-crate.rs
|
|
//@ run-rustfix
|
|
|
|
#![warn(rust_2018_idioms)]
|
|
|
|
#[cfg_attr(test, "macro_use")] //~ ERROR expected
|
|
extern crate remove_extern_crate as foo; //~ WARNING unused extern crate
|
|
extern crate core; //~ WARNING unused extern crate
|
|
|
|
mod another {
|
|
#[cfg_attr(test)] //~ ERROR expected
|
|
extern crate remove_extern_crate as foo; //~ WARNING unused extern crate
|
|
extern crate core; //~ WARNING unused extern crate
|
|
}
|
|
|
|
fn main() {}
|