diff options
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/rustdoc/src/command-line-arguments.md | 14 | ||||
| -rw-r--r-- | src/doc/rustdoc/src/unstable-features.md | 13 |
2 files changed, 13 insertions, 14 deletions
diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md index aba485f752a..417608cc5ca 100644 --- a/src/doc/rustdoc/src/command-line-arguments.md +++ b/src/doc/rustdoc/src/command-line-arguments.md @@ -345,17 +345,3 @@ $ rustdoc src/lib.rs --sysroot /path/to/sysroot Similar to `rustc --sysroot`, this lets you change the sysroot `rustdoc` uses when compiling your code. - -### `--edition`: control the edition of docs and doctests - -Using this flag looks like this: - -```bash -$ rustdoc src/lib.rs --edition 2018 -$ rustdoc --test src/lib.rs --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). - diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index 071575b1fc0..32fb8c2f7d5 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -346,6 +346,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). + ### `--extern-html-root-url`: control how rustdoc links to non-local crates Using this flag looks like this: |
