diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md index 872592d669d6..ac5c7f5b6596 100644 --- a/src/doc/rustdoc/src/command-line-arguments.md +++ b/src/doc/rustdoc/src/command-line-arguments.md @@ -222,6 +222,23 @@ For more, see [the chapter on documentation tests](write-documentation/documenta See also `--test`. +## `--test-runtool`, `--test-runtool-arg`: program to run tests with; args to pass to it + +Using these options looks like this: + +```bash +$ rustdoc src/lib.rs --test-runtool runner --test-runtool-arg --do-thing --test-runtool-arg --do-other-thing +``` + +These options can be used to run the doctest under a program, and also pass arguments to +that program. For example, if you want to run your doctests under valgrind you might run + +```bash +$ rustdoc src/lib.rs --test-runtool valgrind +``` + +Another use case would be to run a test inside an emulator, or through a Virtual Machine. + ## `--target`: generate documentation for the specified target triple Using this flag looks like this: diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index 144f1c61b34b..8d56fc86f945 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -666,25 +666,6 @@ struct Foo; In older versions, this will be ignored on all targets, but on newer versions `ignore-gnu` will override `ignore`. -## `--test-runtool`, `--test-runtool-arg`: program to run tests with; args to pass to it - - * Tracking issue: [#64245](https://github.com/rust-lang/rust/issues/64245) - -Using these options looks like this: - -```bash -$ rustdoc src/lib.rs -Z unstable-options --test-runtool runner --test-runtool-arg --do-thing --test-runtool-arg --do-other-thing -``` - -These options can be used to run the doctest under a program, and also pass arguments to -that program. For example, if you want to run your doctests under valgrind you might run - -```bash -$ rustdoc src/lib.rs -Z unstable-options --test-runtool valgrind -``` - -Another use case would be to run a test inside an emulator, or through a Virtual Machine. - ## `--with-examples`: include examples of uses of items as documentation * Tracking issue: [#88791](https://github.com/rust-lang/rust/issues/88791) diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index daa8e72edb82..c51debdfd40e 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -515,7 +515,7 @@ fn opts() -> Vec { "", ), opt( - Unstable, + Stable, Opt, "", "test-runtool", @@ -523,7 +523,7 @@ fn opts() -> Vec { "The tool to run tests with when building for a different target than host", ), opt( - Unstable, + Stable, Multi, "", "test-runtool-arg", diff --git a/tests/rustdoc/doctest/doctest-runtool.rs b/tests/rustdoc/doctest/doctest-runtool.rs index 75568fab83e7..c4fb02e5228c 100644 --- a/tests/rustdoc/doctest/doctest-runtool.rs +++ b/tests/rustdoc/doctest/doctest-runtool.rs @@ -6,7 +6,6 @@ //@ compile-flags: --test-runtool=auxiliary/bin/doctest-runtool //@ compile-flags: --test-runtool-arg=arg1 --test-runtool-arg //@ compile-flags: 'arg2 with space' -//@ compile-flags: -Zunstable-options /// ``` /// assert_eq!(std::env::var("DOCTEST_RUNTOOL_CHECK"), Ok("xyz".to_string()));