mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
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
@ -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…
Reference in New Issue
Block a user