Skip to content

Commit 69e26df

Browse files
authored
Rollup merge of rust-lang#126681 - Urgau:rustdoc-deny-doc, r=GuillaumeGomez
Rework doc-test attribute documentation example This PR change the doc-test attribute documentation example to prefer a more neutral example `deny(dead_code)`, instead of `deny(warnings)`, which is less susceptible to breakage across Rust version. r? ```@GuillaumeGomez```
2 parents e649eca + d70d76b commit 69e26df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/doc/rustdoc/src/write-documentation/the-doc-attribute.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ it will not.
144144
### `test(attr(...))`
145145

146146
This form of the `doc` attribute allows you to add arbitrary attributes to all your doctests. For
147-
example, if you want your doctests to fail if they produce any warnings, you could add this:
147+
example, if you want your doctests to fail if they have dead code, you could add this:
148148

149149
```rust,no_run
150-
#![doc(test(attr(deny(warnings))))]
150+
#![doc(test(attr(deny(dead_code))))]
151151
```
152152

153153
## At the item level

0 commit comments

Comments
 (0)