Skip to content

Commit

Permalink
added documentation for the -Zdoctest-xcompile feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Goirad committed Sep 20, 2019
1 parent 3596cb8 commit 4b5f104
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bin/cargo/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Available unstable (nightly-only) flags:
-Z install-upgrade -- `cargo install` will upgrade instead of failing
-Z cache-messages -- Cache compiler messages
-Z timings -- Display concurrency information
-Z doctest-xcompile -- Compile and run doctests for non-host target using runner config
Run with 'cargo -Z [FLAG] [SUBCOMMAND]'"
);
Expand Down
15 changes: 15 additions & 0 deletions src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ directory. Example:
cargo +nightly build --out-dir=out -Z unstable-options
```

### doctest-xcompile
* Tracking Issue: [#7040](https://github.com/rust-lang/cargo/issues/7040)
* Tracking Rustc Issue: [#64245](https://github.com/rust-lang/rust/issues/64245)

This flag changes `cargo test`'s behavior when handling doctests when
a target is passed. Currently, if a target is passed that is different
from the host cargo will simply skip testing doctests. If this flag is
present, cargo will continue as normal, passing the tests to doctest,
while also passing it a `--target` option, as well as enabling
`-Zunstable-features --enable-per-target-ignores` and passing along
information from `.cargo/config`. See the rustc issue for more information.

```
cargo test --target foo -Zdoctest-xcompile
```

### Profile Overrides
* Tracking Issue: [rust-lang/rust#48683](https://github.com/rust-lang/rust/issues/48683)
Expand Down

0 comments on commit 4b5f104

Please sign in to comment.