Skip to content

Commit

Permalink
Unrolled build for rust-lang#133191
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#133191 - aDotInTheVoid:whoops-thats-not-stable-and-might-never-be, r=fmease

rustdoc book: Move `--test-builder(--wrapper)?` docs to unstable section.

Tracking issue: rust-lang#102981

These have always been unstable, but were documented in the stable section in rust-lang#114651
  • Loading branch information
rust-timer authored Nov 19, 2024
2 parents 5926e82 + ed465f2 commit d076a26
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/doc/rustdoc/src/command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,32 +447,3 @@ This flag is **deprecated** and **has no effect**.
Rustdoc only supports Rust source code and Markdown input formats. If the
file ends in `.md` or `.markdown`, `rustdoc` treats it as a Markdown file.
Otherwise, it assumes that the input file is Rust.

## `--test-builder`: `rustc`-like program to build tests

Using this flag looks like this:

```bash
$ rustdoc --test-builder /path/to/rustc src/lib.rs
```

Rustdoc will use the provided program to compile tests instead of the default `rustc` program from
the sysroot.

## `--test-builder-wrapper`: wrap calls to the test builder

Using this flag looks like this:

```bash
$ rustdoc --test-builder-wrapper /path/to/rustc-wrapper src/lib.rs
$ rustdoc \
--test-builder-wrapper rustc-wrapper1 \
--test-builder-wrapper rustc-wrapper2 \
--test-builder rustc \
src/lib.rs
```

Similar to cargo `build.rustc-wrapper` option, this flag takes a `rustc` wrapper program.
The first argument to the program will be the test builder program.

This flag can be passed multiple times to nest wrappers.
33 changes: 33 additions & 0 deletions src/doc/rustdoc/src/unstable-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,3 +627,36 @@ add the `--scrape-tests` flag.

This flag enables the generation of links in the source code pages which allow the reader
to jump to a type definition.

### `--test-builder`: `rustc`-like program to build tests

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

Using this flag looks like this:

```bash
$ rustdoc --test-builder /path/to/rustc src/lib.rs
```

Rustdoc will use the provided program to compile tests instead of the default `rustc` program from
the sysroot.

### `--test-builder-wrapper`: wrap calls to the test builder

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

Using this flag looks like this:

```bash
$ rustdoc -Zunstable-options --test-builder-wrapper /path/to/rustc-wrapper src/lib.rs
$ rustdoc -Zunstable-options \
--test-builder-wrapper rustc-wrapper1 \
--test-builder-wrapper rustc-wrapper2 \
--test-builder rustc \
src/lib.rs
```

Similar to cargo `build.rustc-wrapper` option, this flag takes a `rustc` wrapper program.
The first argument to the program will be the test builder program.

This flag can be passed multiple times to nest wrappers.

0 comments on commit d076a26

Please sign in to comment.