Add test to ensure that the missing_doc_code_examples is not triggered on foreign trait implementations
This commit is contained in:
parent
6162529a01
commit
69ca324a53
2 changed files with 10 additions and 1 deletions
|
@ -11,3 +11,12 @@ pub mod foo {
|
|||
//~^ ERROR missing code example in this documentation
|
||||
pub fn bar() {}
|
||||
}
|
||||
|
||||
// This impl is here to ensure the lint isn't emitted for foreign traits implementations.
|
||||
impl std::ops::Neg for Foo {
|
||||
type Output = Self;
|
||||
|
||||
fn neg(self) -> Self::Output {
|
||||
Self
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | |
|
|||
LL | | /// Some docs.
|
||||
LL | |
|
||||
... |
|
||||
LL | | pub fn bar() {}
|
||||
LL | | }
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue