From 6882b3f9d6d5f9a333b26c0afa35e314158dc8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Rakic?= Date: Mon, 3 Jul 2023 20:24:29 +0000 Subject: [PATCH] document `.x test --rustc-args` option --- src/tests/running.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tests/running.md b/src/tests/running.md index 6bc794ca9..71fb82b68 100644 --- a/src/tests/running.md +++ b/src/tests/running.md @@ -133,6 +133,15 @@ Under the hood, the test runner invokes the standard Rust test runner filtering for tests that include "issue-1234" in the name. (Thus `--test-args` is a good way to run a collection of related tests.) +## Passing arguments to `rustc` when running tests + +It can sometimes be useful to run some tests with specific compiler arguments, +without using `RUSTFLAGS` (during development of unstable features, with `-Z` +flags, for example). + +This can be done with `./x test`'s `--rustc-args` option, to pass additional +arguments to the compiler when building the tests. + ## Editing and updating the reference files If you have changed the compiler's output intentionally, or you are