about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOneirical <manchot@videotron.ca>2024-05-11 15:35:49 -0400
committerOneirical <manchot@videotron.ca>2024-05-11 15:35:49 -0400
commit50539da261b885d1d829f77484ef689435fd571c (patch)
tree3b549528ac6a94885af5ae9e0d2b35fd5e025cc3
parent3349155ac082ed9034404428c8402e42a165d3d8 (diff)
downloadrust-50539da261b885d1d829f77484ef689435fd571c.tar.gz
rust-50539da261b885d1d829f77484ef689435fd571c.zip
rewrite alloc tests & remove import
-rw-r--r--tests/run-make/alloc-no-oom-handling/Makefile7
-rw-r--r--tests/run-make/alloc-no-oom-handling/rmake.rs14
-rw-r--r--tests/run-make/alloc-no-rc/Makefile7
-rw-r--r--tests/run-make/alloc-no-rc/rmake.rs14
-rw-r--r--tests/run-make/alloc-no-sync/Makefile7
-rw-r--r--tests/run-make/alloc-no-sync/rmake.rs14
-rw-r--r--tests/run-make/core-no-fp-fmt-parse/rmake.rs1
7 files changed, 42 insertions, 22 deletions
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 7c3ae90b58d..00000000000
--- 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 00000000000..102a7700302
--- /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 fcfe1603b6c..00000000000
--- 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 00000000000..b4a0950d3e4
--- /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 997dbcf6603..00000000000
--- 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 00000000000..32196ba9294
--- /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 e3484888ca5..aef28fd2528 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()