diff options
| author | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-03-27 16:36:15 +0200 |
|---|---|---|
| committer | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-03-27 16:36:15 +0200 |
| commit | a0e48dde7c9d8cc7be9b22d7cf52a9549b5b0637 (patch) | |
| tree | 2a5a146c7d865a98ba2e589d6cdbc64adcf939b3 /src/doc/rustdoc | |
| parent | 7f548bc8c6009c9a777409f8b1895c7ffc25fcb3 (diff) | |
| download | rust-a0e48dde7c9d8cc7be9b22d7cf52a9549b5b0637.tar.gz rust-a0e48dde7c9d8cc7be9b22d7cf52a9549b5b0637.zip | |
talk about --edition in the Rustdoc Book
Diffstat (limited to 'src/doc/rustdoc')
| -rw-r--r-- | src/doc/rustdoc/src/unstable-features.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index 16356c20c70..b43ecab9d00 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -348,6 +348,19 @@ details. [issue-display-warnings]: https://github.com/rust-lang/rust/issues/41574 +### `--edition`: control the edition of docs and doctests + +Using this flag looks like this: + +```bash +$ rustdoc src/lib.rs -Z unstable-options --edition 2018 +$ rustdoc --test src/lib.rs -Z unstable-options --edition 2018 +``` + +This flag allows rustdoc to treat your rust code as the given edition. It will compile doctests with +the given edition as well. As with `rustc`, the default edition that `rustdoc` will use is `2015` +(the first edition). + ### `-Z force-unstable-if-unmarked` Using this flag looks like this: |
