Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #88735 - hnj2:patch-1, r=GuillaumeGomez
Don't lint about missing code examples in derived traits When the `missing_doc_code_examples` lint is performed it also requires that derived Trait implementations have a code example for each member etc., which causes undesirable behavior. # Examples With `missing_doc_code_examples` enable we are not able to use the `Clone` derive macro due to the generated code not being documented: ```rust #[deny(rustdoc::missing_doc_code_examples)] /// docs /// ``` /// let s = SomeStruct; /// ``` #[derive(Clone)] pub struct SomeStruct; ``` yields: ``` Documenting testt v0.1.0 (<redacted>) error: missing code example in this documentation --> src/lib.rs:7:10 | 7 | #[derive(Clone)] | ^^^^^ | note: the lint level is defined here --> src/lib.rs:1:8 | 1 | #[deny(rustdoc::missing_doc_code_examples)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: missing code example in this documentation --> src/lib.rs:7:10 | 7 | #[derive(Clone)] | ^^^^^ error: could not document `testt` Caused by: process didn't exit successfully: `rustdoc ... ``` closes #81775
- Loading branch information