From 2c1264b1f21185a366a5871a54f116af4b728f52 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 23 Mar 2026 11:34:17 +0100 Subject: [PATCH] Mention on which items the `missing_doc_code_examples` is not emitted --- src/doc/rustdoc/src/lints.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/doc/rustdoc/src/lints.md b/src/doc/rustdoc/src/lints.md index c05077befdb3a..2f1e5c687ec2b 100644 --- a/src/doc/rustdoc/src/lints.md +++ b/src/doc/rustdoc/src/lints.md @@ -190,6 +190,16 @@ To fix the lint, you need to add a code example into the documentation block: pub fn no_code_example() {} ``` +This lint is not emitted on the following items: + + * Impl blocks + * Enum variants + * Struct/union fields + * (associated) Type aliases + * Statics/constants + * Modules + * Foreign items (functions, statics, types, etc) + ## `private_doc_tests` This lint is **allowed by default**. It detects documentation tests when they