diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 349f0e3169f..282b615c5bf 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -120,5 +120,4 @@ run-make/test-benches/Makefile run-make/thumb-none-cortex-m/Makefile run-make/thumb-none-qemu/Makefile run-make/translation/Makefile -run-make/unstable-flag-required/Makefile run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile diff --git a/tests/run-make/missing-crate-dependency/rmake.rs b/tests/run-make/missing-crate-dependency/rmake.rs index ab916fc6b61..dae77032f7d 100644 --- a/tests/run-make/missing-crate-dependency/rmake.rs +++ b/tests/run-make/missing-crate-dependency/rmake.rs @@ -3,12 +3,12 @@ // in a dependency chain. // See https://github.com/rust-lang/rust/issues/12146 -use run_make_support::{fs_wrapper, rust_lib_name, rustc}; +use run_make_support::{rfs, rust_lib_name, rustc}; fn main() { rustc().crate_type("rlib").input("crateA.rs").run(); rustc().crate_type("rlib").input("crateB.rs").run(); - fs_wrapper::remove_file(rust_lib_name("crateA")); + rfs::remove_file(rust_lib_name("crateA")); // Ensure that crateC fails to compile, as the crateA dependency is missing. rustc() .input("crateC.rs") diff --git a/tests/run-make/unstable-flag-required/Makefile b/tests/run-make/unstable-flag-required/Makefile deleted file mode 100644 index 17dd15b079c..00000000000 --- a/tests/run-make/unstable-flag-required/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include ../tools.mk - -all: - $(RUSTDOC) --output-format=json x.html 2>&1 | diff - output-format-json.stderr diff --git a/tests/run-make/unstable-flag-required/rmake.rs b/tests/run-make/unstable-flag-required/rmake.rs new file mode 100644 index 00000000000..c521436c203 --- /dev/null +++ b/tests/run-make/unstable-flag-required/rmake.rs @@ -0,0 +1,12 @@ +// The flag `--output-format` is unauthorized on beta and stable releases, which led +// to confusion for maintainers doing testing on nightly. Tying it to an unstable flag +// elucidates this, and this test checks that `--output-format` cannot be passed on its +// own. +// See https://github.com/rust-lang/rust/pull/82497 + +use run_make_support::{diff, rustdoc}; + +fn main() { + let out = rustdoc().output_format("json").input("x.html").run_fail().stderr_utf8(); + diff().expected_file("output-format-json.stderr").actual_text("actual-json", out).run(); +}