We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f548bc commit a0e48ddCopy full SHA for a0e48dd
src/doc/rustdoc/src/unstable-features.md
@@ -348,6 +348,19 @@ details.
348
349
[issue-display-warnings]: https://github.com/rust-lang/rust/issues/41574
350
351
+### `--edition`: control the edition of docs and doctests
352
+
353
+Using this flag looks like this:
354
355
+```bash
356
+$ rustdoc src/lib.rs -Z unstable-options --edition 2018
357
+$ rustdoc --test src/lib.rs -Z unstable-options --edition 2018
358
+```
359
360
+This flag allows rustdoc to treat your rust code as the given edition. It will compile doctests with
361
+the given edition as well. As with `rustc`, the default edition that `rustdoc` will use is `2015`
362
+(the first edition).
363
364
### `-Z force-unstable-if-unmarked`
365
366
Using this flag looks like this:
0 commit comments