Skip to content

Commit 5e93394

Browse files
talk about --display-warnings
1 parent b5ab5ce commit 5e93394

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,3 +329,19 @@ When rendering docs, `rustdoc` creates several CSS and JavaScript files as part
329329
all these files are linked from every page, changing where they are can be cumbersome if you need to
330330
specially cache them. This flag will rename all these files in the output to include the suffix in
331331
the filename. For example, `main.css` would become `main-suf.css` with the above command.
332+
333+
### `--display-warnings`: display warnings when documenting or running documentation tests
334+
335+
Using this flag looks like this:
336+
337+
```bash
338+
$ rustdoc src/lib.rs -Z unstable-options --display-warnings
339+
$ rustdoc --test src/lib.rs -Z unstable-options --display-warnings
340+
```
341+
342+
The intent behind this flag is to allow the user to see warnings that occur within their library or
343+
their documentation tests, which are usually suppressed. However, [due to a
344+
bug][issue-display-warnings], this flag doesn't 100% work as intended. See the linked issue for
345+
details.
346+
347+
[issue-display-warnings]: https://github.com/rust-lang/rust/issues/41574

0 commit comments

Comments
 (0)