Migrate run-make/allow-warnings-cmdline-stability to rmake.rs

This commit is contained in:
Guillaume Gomez 2024-05-26 13:37:53 +02:00
parent 56733372b8
commit 404d47ec20
3 changed files with 11 additions and 17 deletions

View File

@ -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

View File

@ -1,16 +0,0 @@
# ignore-cross-compile
include ../tools.mk
# Test that -A warnings makes the 'empty trait list for derive' warning go away
DEP=$(shell $(RUSTC) bar.rs)
OUT=$(shell $(RUSTC) foo.rs -A warnings 2>&1 | grep "warning" )
all: foo bar
test -z '$(OUT)'
# These are just to ensure that the above commands actually work
bar:
$(RUSTC) bar.rs
foo: bar
$(RUSTC) foo.rs -A warnings

View File

@ -0,0 +1,11 @@
// Test that `-Awarnings` suppresses warnings for unstable APIs.
use run_make_support::{assert_not_contains, rustc};
fn main() {
rustc().input("bar.rs").run();
let output = rustc().input("foo.rs").arg("-Awarnings").run();
assert_not_contains(&String::from_utf8(output.stdout).unwrap(), "warning");
assert_not_contains(&String::from_utf8(output.stderr).unwrap(), "warning");
}