Skip to content

Commit b85fcf5

Browse files
Remove mention of missing_doc_code_examples lint from rustdoc book
1 parent cdc4fa4 commit b85fcf5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/doc/rustdoc/src/unstable-features.md

+9
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ future.
3838
Attempting to use these error numbers on stable will result in the code sample being interpreted as
3939
plain text.
4040

41+
### `missing_doc_code_examples` lint
42+
43+
This lint will emit a warning if an item doesn't have a code example in its documentation.
44+
It can be enabled using:
45+
46+
```rust,ignore (nightly)
47+
#![deny(rustdoc::missing_doc_code_examples)]
48+
```
49+
4150
## Extensions to the `#[doc]` attribute
4251

4352
These features operate by extending the `#[doc]` attribute, and thus can be caught by the compiler

src/doc/rustdoc/src/write-documentation/what-to-include.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ warning: 1 warning emitted
3939
As a library author, adding the lint `#![deny(missing_docs)]` is a great way to
4040
ensure the project does not drift away from being documented well, and
4141
`#![warn(missing_docs)]` is a good way to move towards comprehensive
42-
documentation. In addition to docs, `#![deny(rustdoc::missing_doc_code_examples)]`
43-
ensures each function contains a usage example. In our example above, the
44-
warning is resolved by adding crate level documentation.
42+
documentation.
4543

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

0 commit comments

Comments
 (0)