Skip to content

Commit

Permalink
talk about --edition in the Rustdoc Book
Browse files Browse the repository at this point in the history
  • Loading branch information
QuietMisdreavus committed Mar 27, 2018
1 parent 7f548bc commit a0e48dd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/doc/rustdoc/src/unstable-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a0e48dd

Please sign in to comment.