Add test to ensure that the missing_doc_code_examples is not triggered on foreign trait implementations
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user