about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-05-23 20:09:08 +0200
committerGitHub <noreply@github.com>2024-05-23 20:09:08 +0200
commite282b1f753296b85e21cfc984098f654989b6fea (patch)
treeedd529bb8e872e3611a5ae81b4131ffb5846baf5
parentf862f6d292bd60eccf5e64dc2acfa6b369f1a263 (diff)
parentdd7e68b3566c9417eb13ba8b09c74481727ff977 (diff)
downloadrust-e282b1f753296b85e21cfc984098f654989b6fea.tar.gz
rust-e282b1f753296b85e21cfc984098f654989b6fea.zip
Rollup merge of #125224 - Oneirical:sixth, r=jieyouxu
Migrate `run-make/issue-53964` to `rmake`

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

This is extremely similar to #125146. Could it be interesting to merge the two in some way? This one seems to do the same thing as the #125146, but with an added check that a useless lint is not shown.
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt1
-rw-r--r--tests/run-make/external-crate-panic-handle-no-lint/app.rs (renamed from tests/run-make/issue-53964/app.rs)0
-rw-r--r--tests/run-make/external-crate-panic-handle-no-lint/panic.rs (renamed from tests/run-make/issue-53964/panic.rs)0
-rw-r--r--tests/run-make/external-crate-panic-handle-no-lint/rmake.rs12
-rw-r--r--tests/run-make/issue-53964/Makefile5
5 files changed, 12 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 a10dea2daa1..f509754a64d 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -111,7 +111,6 @@ run-make/issue-40535/Makefile
 run-make/issue-47384/Makefile
 run-make/issue-47551/Makefile
 run-make/issue-51671/Makefile
-run-make/issue-53964/Makefile
 run-make/issue-64153/Makefile
 run-make/issue-68794-textrel-on-minimal-lib/Makefile
 run-make/issue-69368/Makefile
diff --git a/tests/run-make/issue-53964/app.rs b/tests/run-make/external-crate-panic-handle-no-lint/app.rs
index 8127b9578bf..8127b9578bf 100644
--- a/tests/run-make/issue-53964/app.rs
+++ b/tests/run-make/external-crate-panic-handle-no-lint/app.rs
diff --git a/tests/run-make/issue-53964/panic.rs b/tests/run-make/external-crate-panic-handle-no-lint/panic.rs
index a8781205071..a8781205071 100644
--- a/tests/run-make/issue-53964/panic.rs
+++ b/tests/run-make/external-crate-panic-handle-no-lint/panic.rs
diff --git a/tests/run-make/external-crate-panic-handle-no-lint/rmake.rs b/tests/run-make/external-crate-panic-handle-no-lint/rmake.rs
new file mode 100644
index 00000000000..de4023282ef
--- /dev/null
+++ b/tests/run-make/external-crate-panic-handle-no-lint/rmake.rs
@@ -0,0 +1,12 @@
+// Defining a crate that provides panic handling as an external crate
+// could uselessly trigger the "unused external crate" lint. In this test,
+// if the lint is triggered, it will trip #![deny(unused_extern_crates)],
+// and cause the test to fail.
+// See https://github.com/rust-lang/rust/issues/53964
+
+use run_make_support::{rustc, tmp_dir};
+
+fn main() {
+    rustc().input("panic.rs").run();
+    rustc().input("app.rs").panic("abort").emit("obj").library_search_path(tmp_dir()).run();
+}
diff --git a/tests/run-make/issue-53964/Makefile b/tests/run-make/issue-53964/Makefile
deleted file mode 100644
index 6bd83021374..00000000000
--- a/tests/run-make/issue-53964/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../tools.mk
-
-all:
-	$(RUSTC) panic.rs
-	$(RUSTC) -C panic=abort --emit=obj app.rs -L $(TMPDIR)