From 50539da261b885d1d829f77484ef689435fd571c Mon Sep 17 00:00:00 2001 From: Oneirical Date: Sat, 11 May 2024 15:35:49 -0400 Subject: [PATCH 1/2] rewrite alloc tests & remove import --- tests/run-make/alloc-no-oom-handling/Makefile | 7 ------- tests/run-make/alloc-no-oom-handling/rmake.rs | 14 ++++++++++++++ tests/run-make/alloc-no-rc/Makefile | 7 ------- tests/run-make/alloc-no-rc/rmake.rs | 14 ++++++++++++++ tests/run-make/alloc-no-sync/Makefile | 7 ------- tests/run-make/alloc-no-sync/rmake.rs | 14 ++++++++++++++ tests/run-make/core-no-fp-fmt-parse/rmake.rs | 1 - 7 files changed, 42 insertions(+), 22 deletions(-) delete mode 100644 tests/run-make/alloc-no-oom-handling/Makefile create mode 100644 tests/run-make/alloc-no-oom-handling/rmake.rs delete mode 100644 tests/run-make/alloc-no-rc/Makefile create mode 100644 tests/run-make/alloc-no-rc/rmake.rs delete mode 100644 tests/run-make/alloc-no-sync/Makefile create mode 100644 tests/run-make/alloc-no-sync/rmake.rs diff --git a/tests/run-make/alloc-no-oom-handling/Makefile b/tests/run-make/alloc-no-oom-handling/Makefile deleted file mode 100644 index 7c3ae90b58d6..000000000000 --- a/tests/run-make/alloc-no-oom-handling/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# This test checks that alloc can still compile correctly when the unstable no_global_oom_handling feature is turned on. -# See https://github.com/rust-lang/rust/pull/84266 - -include ../tools.mk - -all: - $(RUSTC) --edition=2021 -Dwarnings --crate-type=rlib ../../../library/alloc/src/lib.rs --cfg no_global_oom_handling diff --git a/tests/run-make/alloc-no-oom-handling/rmake.rs b/tests/run-make/alloc-no-oom-handling/rmake.rs new file mode 100644 index 000000000000..102a77003027 --- /dev/null +++ b/tests/run-make/alloc-no-oom-handling/rmake.rs @@ -0,0 +1,14 @@ +// This test checks that alloc can still compile correctly when the unstable no_global_oom_handling feature is turned on. +// See https://github.com/rust-lang/rust/pull/84266 + +use run_make_support::rustc; + +fn main() { + rustc() + .edition("2021") + .arg("-Dwarnings") + .crate_type("rlib") + .input("../../../library/alloc/src/lib.rs") + .cfg("no_global_oom_handling") + .run(); +} diff --git a/tests/run-make/alloc-no-rc/Makefile b/tests/run-make/alloc-no-rc/Makefile deleted file mode 100644 index fcfe1603b6ce..000000000000 --- a/tests/run-make/alloc-no-rc/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# This test checks that alloc can still compile correctly when the unstable no_rc feature is turned on. -# See https://github.com/rust-lang/rust/pull/89891 - -include ../tools.mk - -all: - $(RUSTC) --edition=2021 -Dwarnings --crate-type=rlib ../../../library/alloc/src/lib.rs --cfg no_rc diff --git a/tests/run-make/alloc-no-rc/rmake.rs b/tests/run-make/alloc-no-rc/rmake.rs new file mode 100644 index 000000000000..b4a0950d3e48 --- /dev/null +++ b/tests/run-make/alloc-no-rc/rmake.rs @@ -0,0 +1,14 @@ +// This test checks that alloc can still compile correctly when the unstable no_rc feature is turned on. +// See https://github.com/rust-lang/rust/pull/84266 + +use run_make_support::rustc; + +fn main() { + rustc() + .edition("2021") + .arg("-Dwarnings") + .crate_type("rlib") + .input("../../../library/alloc/src/lib.rs") + .cfg("no_rc") + .run(); +} diff --git a/tests/run-make/alloc-no-sync/Makefile b/tests/run-make/alloc-no-sync/Makefile deleted file mode 100644 index 997dbcf66036..000000000000 --- a/tests/run-make/alloc-no-sync/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# This test checks that alloc can still compile correctly when the unstable no_sync feature is turned on. -# See https://github.com/rust-lang/rust/pull/89891 - -include ../tools.mk - -all: - $(RUSTC) --edition=2021 -Dwarnings --crate-type=rlib ../../../library/alloc/src/lib.rs --cfg no_sync diff --git a/tests/run-make/alloc-no-sync/rmake.rs b/tests/run-make/alloc-no-sync/rmake.rs new file mode 100644 index 000000000000..32196ba92944 --- /dev/null +++ b/tests/run-make/alloc-no-sync/rmake.rs @@ -0,0 +1,14 @@ +// This test checks that alloc can still compile correctly when the unstable no_sync feature is turned on. +// See https://github.com/rust-lang/rust/pull/84266 + +use run_make_support::rustc; + +fn main() { + rustc() + .edition("2021") + .arg("-Dwarnings") + .crate_type("rlib") + .input("../../../library/alloc/src/lib.rs") + .cfg("no_sync") + .run(); +} diff --git a/tests/run-make/core-no-fp-fmt-parse/rmake.rs b/tests/run-make/core-no-fp-fmt-parse/rmake.rs index e3484888ca5a..aef28fd25281 100644 --- a/tests/run-make/core-no-fp-fmt-parse/rmake.rs +++ b/tests/run-make/core-no-fp-fmt-parse/rmake.rs @@ -2,7 +2,6 @@ // support for formatting and parsing floating-point numbers. use run_make_support::rustc; -use std::path::PathBuf; fn main() { rustc() From 198b073192402510eb7b0b0ec2a98ca6dbdeebc1 Mon Sep 17 00:00:00 2001 From: Oneirical Date: Sat, 11 May 2024 15:54:18 -0400 Subject: [PATCH 2/2] make tidy happy --- src/tools/tidy/src/allowed_run_make_makefiles.txt | 3 --- tests/run-make/alloc-no-oom-handling/rmake.rs | 3 ++- tests/run-make/alloc-no-rc/rmake.rs | 3 ++- tests/run-make/alloc-no-sync/rmake.rs | 3 ++- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index e87950b36d9d..d96fc3f41f72 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -1,6 +1,3 @@ -run-make/alloc-no-oom-handling/Makefile -run-make/alloc-no-rc/Makefile -run-make/alloc-no-sync/Makefile run-make/allocator-shim-circular-deps/Makefile run-make/allow-non-lint-warnings-cmdline/Makefile run-make/allow-warnings-cmdline-stability/Makefile diff --git a/tests/run-make/alloc-no-oom-handling/rmake.rs b/tests/run-make/alloc-no-oom-handling/rmake.rs index 102a77003027..fec3c6532940 100644 --- a/tests/run-make/alloc-no-oom-handling/rmake.rs +++ b/tests/run-make/alloc-no-oom-handling/rmake.rs @@ -1,4 +1,5 @@ -// This test checks that alloc can still compile correctly when the unstable no_global_oom_handling feature is turned on. +// This test checks that alloc can still compile correctly +// when the unstable no_global_oom_handling feature is turned on. // See https://github.com/rust-lang/rust/pull/84266 use run_make_support::rustc; diff --git a/tests/run-make/alloc-no-rc/rmake.rs b/tests/run-make/alloc-no-rc/rmake.rs index b4a0950d3e48..c5744a3f5eef 100644 --- a/tests/run-make/alloc-no-rc/rmake.rs +++ b/tests/run-make/alloc-no-rc/rmake.rs @@ -1,4 +1,5 @@ -// This test checks that alloc can still compile correctly when the unstable no_rc feature is turned on. +// This test checks that alloc can still compile correctly +// when the unstable no_rc feature is turned on. // See https://github.com/rust-lang/rust/pull/84266 use run_make_support::rustc; diff --git a/tests/run-make/alloc-no-sync/rmake.rs b/tests/run-make/alloc-no-sync/rmake.rs index 32196ba92944..6410eca80abf 100644 --- a/tests/run-make/alloc-no-sync/rmake.rs +++ b/tests/run-make/alloc-no-sync/rmake.rs @@ -1,4 +1,5 @@ -// This test checks that alloc can still compile correctly when the unstable no_sync feature is turned on. +// This test checks that alloc can still compile correctly +// when the unstable no_sync feature is turned on. // See https://github.com/rust-lang/rust/pull/84266 use run_make_support::rustc;