Rework doc-test attribute documentation example

This commit is contained in:
Urgau 2024-06-19 13:08:26 +02:00
parent e23ae72ac7
commit d70d76b9e7

View File

@ -144,10 +144,10 @@ it will not.
### `test(attr(...))`
This form of the `doc` attribute allows you to add arbitrary attributes to all your doctests. For
example, if you want your doctests to fail if they produce any warnings, you could add this:
example, if you want your doctests to fail if they have dead code, you could add this:
```rust,no_run
#![doc(test(attr(deny(warnings))))]
#![doc(test(attr(deny(dead_code))))]
```
## At the item level