about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-05-28 18:04:32 +0200
committerGitHub <noreply@github.com>2024-05-28 18:04:32 +0200
commit78b4cafa6e2e66a71a7ef51dfca0d2d6d8607bf8 (patch)
tree1647a8a6b8f83140677a6565a2e9f2281e38e540 /src
parent713c852a2f46da2a298e1e67bc15d5fef58c6ee9 (diff)
parent404d47ec20cf7606d28156945a6a4fc831c6e7d8 (diff)
downloadrust-78b4cafa6e2e66a71a7ef51dfca0d2d6d8607bf8.tar.gz
rust-78b4cafa6e2e66a71a7ef51dfca0d2d6d8607bf8.zip
Rollup merge of #125573 - GuillaumeGomez:migrate-allow-warnings-cmdline-stability, r=jieyouxu
Migrate `run-make/allow-warnings-cmdline-stability` to `rmake.rs`

Part of https://github.com/rust-lang/rust/issues/121876.

r? ``@jieyouxu``
Diffstat (limited to 'src')
-rw-r--r--src/tools/run-make-support/src/lib.rs11
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt1
2 files changed, 11 insertions, 1 deletions
diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs
index d96c8b89127..35d7b65bec0 100644
--- a/src/tools/run-make-support/src/lib.rs
+++ b/src/tools/run-make-support/src/lib.rs
@@ -268,6 +268,17 @@ pub fn recursive_diff(dir1: impl AsRef<Path>, dir2: impl AsRef<Path>) {
     }
 }
 
+/// Check that `haystack` does not contain `needle`. Panic otherwise.
+pub fn assert_not_contains(haystack: &str, needle: &str) {
+    if haystack.contains(needle) {
+        eprintln!("=== HAYSTACK ===");
+        eprintln!("{}", haystack);
+        eprintln!("=== NEEDLE ===");
+        eprintln!("{}", needle);
+        panic!("needle was unexpectedly found in haystack");
+    }
+}
+
 /// Implement common helpers for command wrappers. This assumes that the command wrapper is a struct
 /// containing a `cmd: Command` field and a `output` function. The provided helpers are:
 ///
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index 2329b8b44de..9ca27834cf7 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -1,6 +1,5 @@
 run-make/allocator-shim-circular-deps/Makefile
 run-make/allow-non-lint-warnings-cmdline/Makefile
-run-make/allow-warnings-cmdline-stability/Makefile
 run-make/archive-duplicate-names/Makefile
 run-make/atomic-lock-free/Makefile
 run-make/bare-outfile/Makefile