Skip to content

Commit c0c0711

Browse files
committed
Stabilize --test-runtool and --test-runtool-arg
1 parent 054ab7d commit c0c0711

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

src/doc/rustdoc/src/command-line-arguments.md

+17
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,23 @@ For more, see [the chapter on documentation tests](write-documentation/documenta
221221

222222
See also `--test`.
223223

224+
## `--test-runtool`, `--test-runtool-arg`: program to run tests with; args to pass to it
225+
226+
Using these options looks like this:
227+
228+
```bash
229+
$ rustdoc src/lib.rs --test-runtool runner --test-runtool-arg --do-thing --test-runtool-arg --do-other-thing
230+
```
231+
232+
These options can be used to run the doctest under a program, and also pass arguments to
233+
that program. For example, if you want to run your doctests under valgrind you might run
234+
235+
```bash
236+
$ rustdoc src/lib.rs --test-runtool valgrind
237+
```
238+
239+
Another use case would be to run a test inside an emulator, or through a Virtual Machine.
240+
224241
## `--target`: generate documentation for the specified target triple
225242

226243
Using this flag looks like this:

src/doc/rustdoc/src/unstable-features.md

-19
Original file line numberDiff line numberDiff line change
@@ -647,25 +647,6 @@ struct Foo;
647647
In older versions, this will be ignored on all targets, but on newer versions `ignore-gnu` will
648648
override `ignore`.
649649

650-
## `--test-runtool`, `--test-runtool-arg`: program to run tests with; args to pass to it
651-
652-
* Tracking issue: [#64245](https://github.com/rust-lang/rust/issues/64245)
653-
654-
Using these options looks like this:
655-
656-
```bash
657-
$ rustdoc src/lib.rs -Z unstable-options --test-runtool runner --test-runtool-arg --do-thing --test-runtool-arg --do-other-thing
658-
```
659-
660-
These options can be used to run the doctest under a program, and also pass arguments to
661-
that program. For example, if you want to run your doctests under valgrind you might run
662-
663-
```bash
664-
$ rustdoc src/lib.rs -Z unstable-options --test-runtool valgrind
665-
```
666-
667-
Another use case would be to run a test inside an emulator, or through a Virtual Machine.
668-
669650
## `--with-examples`: include examples of uses of items as documentation
670651

671652
* Tracking issue: [#88791](https://github.com/rust-lang/rust/issues/88791)

src/librustdoc/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -516,15 +516,15 @@ fn opts() -> Vec<RustcOptGroup> {
516516
"",
517517
),
518518
opt(
519-
Unstable,
519+
Stable,
520520
Opt,
521521
"",
522522
"test-runtool",
523523
"",
524524
"The tool to run tests with when building for a different target than host",
525525
),
526526
opt(
527-
Unstable,
527+
Stable,
528528
Multi,
529529
"",
530530
"test-runtool-arg",

tests/rustdoc/doctest/doctest-runtool.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//@ compile-flags: --test-runtool=auxiliary/bin/doctest-runtool
77
//@ compile-flags: --test-runtool-arg=arg1 --test-runtool-arg
88
//@ compile-flags: 'arg2 with space'
9-
//@ compile-flags: -Zunstable-options
109

1110
/// ```
1211
/// assert_eq!(std::env::var("DOCTEST_RUNTOOL_CHECK"), Ok("xyz".to_string()));

0 commit comments

Comments
 (0)