From 1491c6f3117749cbefd6d0dc9c425a64ecff4f8d Mon Sep 17 00:00:00 2001 From: Peter Kehl Date: Sat, 25 Mar 2023 06:19:52 -0700 Subject: [PATCH] Rustdoc Book refer to rustdoc::missing_doc_code_examples. Fixes #109592. --- src/doc/rustdoc/src/write-documentation/what-to-include.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/rustdoc/src/write-documentation/what-to-include.md b/src/doc/rustdoc/src/write-documentation/what-to-include.md index e1e09aa4a8a..cf1e6a8d3ca 100644 --- a/src/doc/rustdoc/src/write-documentation/what-to-include.md +++ b/src/doc/rustdoc/src/write-documentation/what-to-include.md @@ -39,7 +39,7 @@ warning: 1 warning emitted As a library author, adding the lint `#![deny(missing_docs)]` is a great way to ensure the project does not drift away from being documented well, and `#![warn(missing_docs)]` is a good way to move towards comprehensive -documentation. In addition to docs, `#![deny(missing_doc_code_examples)]` +documentation. In addition to docs, `#![deny(rustdoc::missing_doc_code_examples)]` ensures each function contains a usage example. In our example above, the warning is resolved by adding crate level documentation.