Skip to content

Commit 62d1062

Browse files
authored
Unrolled build for #144246
Rollup merge of #144246 - jieyouxu:no-dual-test, r=lqd,RalfJung Don't use another main test file as auxiliary In this case, the exact extern crate isn't very important, it just needs to not be another main test file. 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. Part 1 of #144237. r? ``@RalfJung`` (or compiler)
2 parents 3f9f20f + 74ba9cb commit 62d1062

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tests/ui/rust-2018/removing-extern-crate-malformed-cfg.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ edition:2018
2-
//@ aux-build:../removing-extern-crate.rs
2+
//@ aux-build: remove-extern-crate.rs
33
//@ run-rustfix
44

55
#![warn(rust_2018_idioms)]

tests/ui/rust-2018/removing-extern-crate-malformed-cfg.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
//@ edition:2018
2-
//@ aux-build:../removing-extern-crate.rs
2+
//@ aux-build: remove-extern-crate.rs
33
//@ run-rustfix
44

55
#![warn(rust_2018_idioms)]
66

77
#[cfg_attr(test, "macro_use")] //~ ERROR expected
8-
extern crate removing_extern_crate as foo; //~ WARNING unused extern crate
8+
extern crate remove_extern_crate as foo; //~ WARNING unused extern crate
99
extern crate core; //~ WARNING unused extern crate
1010

1111
mod another {
1212
#[cfg_attr(test)] //~ ERROR expected
13-
extern crate removing_extern_crate as foo; //~ WARNING unused extern crate
13+
extern crate remove_extern_crate as foo; //~ WARNING unused extern crate
1414
extern crate core; //~ WARNING unused extern crate
1515
}
1616

tests/ui/rust-2018/removing-extern-crate-malformed-cfg.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ LL | #[cfg_attr(test)]
1919
warning: unused extern crate
2020
--> $DIR/removing-extern-crate-malformed-cfg.rs:8:1
2121
|
22-
LL | extern crate removing_extern_crate as foo;
23-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
22+
LL | extern crate remove_extern_crate as foo;
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
2424
|
2525
note: the lint level is defined here
2626
--> $DIR/removing-extern-crate-malformed-cfg.rs:5:9
@@ -31,7 +31,7 @@ LL | #![warn(rust_2018_idioms)]
3131
help: remove the unused `extern crate`
3232
|
3333
LL - #[cfg_attr(test, "macro_use")]
34-
LL - extern crate removing_extern_crate as foo;
34+
LL - extern crate remove_extern_crate as foo;
3535
LL +
3636
|
3737

@@ -50,13 +50,13 @@ LL +
5050
warning: unused extern crate
5151
--> $DIR/removing-extern-crate-malformed-cfg.rs:13:5
5252
|
53-
LL | extern crate removing_extern_crate as foo;
54-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
53+
LL | extern crate remove_extern_crate as foo;
54+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
5555
|
5656
help: remove the unused `extern crate`
5757
|
5858
LL - #[cfg_attr(test)]
59-
LL - extern crate removing_extern_crate as foo;
59+
LL - extern crate remove_extern_crate as foo;
6060
LL +
6161
|
6262

0 commit comments

Comments
 (0)