From d70d76b9e7cd80b01797b433dd2baf7a6720e21e Mon Sep 17 00:00:00 2001 From: Urgau Date: Wed, 19 Jun 2024 13:08:26 +0200 Subject: [PATCH] Rework doc-test attribute documentation example --- src/doc/rustdoc/src/write-documentation/the-doc-attribute.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/rustdoc/src/write-documentation/the-doc-attribute.md b/src/doc/rustdoc/src/write-documentation/the-doc-attribute.md index 669dc9358ebfc..ff033aa14b821 100644 --- a/src/doc/rustdoc/src/write-documentation/the-doc-attribute.md +++ b/src/doc/rustdoc/src/write-documentation/the-doc-attribute.md @@ -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