Skip to content

Commit f8a8b8f

Browse files
Mention on which items the missing_doc_code_examples is not emitted
1 parent e52f547 commit f8a8b8f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/doc/rustdoc/src/lints.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,16 @@ To fix the lint, you need to add a code example into the documentation block:
190190
pub fn no_code_example() {}
191191
```
192192

193+
This lint is not emitted on the following items:
194+
195+
* Impl blocks (both trait and inherent)
196+
* Enum variants
197+
* Struct/union fields
198+
* Type aliases, including associated types
199+
* Statics/constants
200+
* Modules (including the top-level module of a crate)
201+
* Foreign items from reexports (functions, statics, types, etc)
202+
193203
## `private_doc_tests`
194204

195205
This lint is **allowed by default**. It detects documentation tests when they

0 commit comments

Comments
 (0)