Skip to content

Commit abb9563

Browse files
committed
Auto merge of #125024 - Oneirical:master, r=jieyouxu
Rewrite 3 very similar `run-make` alloc tests to rmake Part of #121876 #121918 attempted to port these 3 tests 2 months ago. However, since then, the structure of `run-make-support` has changed a bit and new helper functions were added. Since there has been no activity on the PR, they are good low-hanging fruit to knock down, using the new functions of the current library. There is also the removal of a useless import on a very similar test.
2 parents 6be7b0c + 198b073 commit abb9563

File tree

8 files changed

+45
-25
lines changed

8 files changed

+45
-25
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
run-make/alloc-no-oom-handling/Makefile
2-
run-make/alloc-no-rc/Makefile
3-
run-make/alloc-no-sync/Makefile
41
run-make/allocator-shim-circular-deps/Makefile
52
run-make/allow-non-lint-warnings-cmdline/Makefile
63
run-make/allow-warnings-cmdline-stability/Makefile

tests/run-make/alloc-no-oom-handling/Makefile

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// This test checks that alloc can still compile correctly
2+
// when the unstable no_global_oom_handling feature is turned on.
3+
// See https://github.com/rust-lang/rust/pull/84266
4+
5+
use run_make_support::rustc;
6+
7+
fn main() {
8+
rustc()
9+
.edition("2021")
10+
.arg("-Dwarnings")
11+
.crate_type("rlib")
12+
.input("../../../library/alloc/src/lib.rs")
13+
.cfg("no_global_oom_handling")
14+
.run();
15+
}

tests/run-make/alloc-no-rc/Makefile

-7
This file was deleted.

tests/run-make/alloc-no-rc/rmake.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// This test checks that alloc can still compile correctly
2+
// when the unstable no_rc feature is turned on.
3+
// See https://github.com/rust-lang/rust/pull/84266
4+
5+
use run_make_support::rustc;
6+
7+
fn main() {
8+
rustc()
9+
.edition("2021")
10+
.arg("-Dwarnings")
11+
.crate_type("rlib")
12+
.input("../../../library/alloc/src/lib.rs")
13+
.cfg("no_rc")
14+
.run();
15+
}

tests/run-make/alloc-no-sync/Makefile

-7
This file was deleted.

tests/run-make/alloc-no-sync/rmake.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// This test checks that alloc can still compile correctly
2+
// when the unstable no_sync feature is turned on.
3+
// See https://github.com/rust-lang/rust/pull/84266
4+
5+
use run_make_support::rustc;
6+
7+
fn main() {
8+
rustc()
9+
.edition("2021")
10+
.arg("-Dwarnings")
11+
.crate_type("rlib")
12+
.input("../../../library/alloc/src/lib.rs")
13+
.cfg("no_sync")
14+
.run();
15+
}

tests/run-make/core-no-fp-fmt-parse/rmake.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// support for formatting and parsing floating-point numbers.
33

44
use run_make_support::rustc;
5-
use std::path::PathBuf;
65

76
fn main() {
87
rustc()

0 commit comments

Comments
 (0)