Skip to content

Commit f9d3845

Browse files
talk about --crate-version
1 parent 5d8443a commit f9d3845

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/doc/rustdoc/src/unstable-features.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,15 @@ If both `--playground-url` and `--markdown-playground-url` are present when rend
254254
Markdown file, the URL given to `--markdown-playground-url` will take precedence. If both
255255
`--playground-url` and `#![doc(html_playground_url = "url")]` are present when rendering crate docs,
256256
the attribute will take precedence.
257+
258+
### `--crate-version`: control the crate version
259+
260+
Using this flag looks like this:
261+
262+
```bash
263+
$ rustdoc src/lib.rs -Z unstable-options --crate-version 1.3.37
264+
```
265+
266+
When `rustdoc` receives this flag, it will print an extra "Version (version)" into the sidebar of
267+
the crate root's docs. You can use this flag to differentiate between different versions of your
268+
library's documentation.

0 commit comments

Comments
 (0)