]> git.lizzy.rs Git - rust.git/commitdiff
talk about --crate-version
authorQuietMisdreavus <grey@quietmisdreavus.net>
Fri, 16 Mar 2018 18:38:06 +0000 (13:38 -0500)
committerQuietMisdreavus <grey@quietmisdreavus.net>
Fri, 16 Mar 2018 18:38:06 +0000 (13:38 -0500)
src/doc/rustdoc/src/unstable-features.md

index 9cb5760ec3797c201750950ebbc0456baef84e76..867e4585d9c1e91fdf84335c361f0d17738e8fea 100644 (file)
@@ -254,3 +254,15 @@ If both `--playground-url` and `--markdown-playground-url` are present when rend
 Markdown file, the URL given to `--markdown-playground-url` will take precedence. If both
 `--playground-url` and `#![doc(html_playground_url = "url")]` are present when rendering crate docs,
 the attribute will take precedence.
+
+### `--crate-version`: control the crate version
+
+Using this flag looks like this:
+
+```bash
+$ rustdoc src/lib.rs -Z unstable-options --crate-version 1.3.37
+```
+
+When `rustdoc` receives this flag, it will print an extra "Version (version)" into the sidebar of
+the crate root's docs. You can use this flag to differentiate between different versions of your
+library's documentation.