Skip to content

Commit

Permalink
Auto merge of #109767 - GuillaumeGomez:rm-mention-missing_doc_code_ex…
Browse files Browse the repository at this point in the history
…amples, r=notriddle

Remove mention of `missing_doc_code_examples` lint from rustdoc book

Fixes #109601.

r? `@notriddle`
  • Loading branch information
bors committed Apr 8, 2023
2 parents 66f8dd1 + b85fcf5 commit 4f87a63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/doc/rustdoc/src/unstable-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ future.
Attempting to use these error numbers on stable will result in the code sample being interpreted as
plain text.

### `missing_doc_code_examples` lint

This lint will emit a warning if an item doesn't have a code example in its documentation.
It can be enabled using:

```rust,ignore (nightly)
#![deny(rustdoc::missing_doc_code_examples)]
```

## Extensions to the `#[doc]` attribute

These features operate by extending the `#[doc]` attribute, and thus can be caught by the compiler
Expand Down
4 changes: 1 addition & 3 deletions src/doc/rustdoc/src/write-documentation/what-to-include.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +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(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.
documentation.

There are more lints in the upcoming chapter [Lints][rustdoc-lints].

Expand Down

0 comments on commit 4f87a63

Please sign in to comment.