Skip to content

Commit 5ac294b

Browse files
Rollup merge of #154249 - GuillaumeGomez:missing_doc_code_examples-doc, r=lolbinarycat
Mention on which items the `missing_doc_code_examples` is not emitted As mentioned in #154048, the lint's documentation didn't mention which items were ignored. This PR fixes that. r? @lolbinarycat
2 parents 0e95a0f + f8a8b8f commit 5ac294b

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)