mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Rollup merge of #90098 - GuillaumeGomez:add-test-foreign-impl-missing-doc-code-examples, r=jyn514
Add test to ensure that the missing_doc_code_examples is not triggered on foreign trait implementations Fixes #76450. r? ````@jyn514````
This commit is contained in:
commit
68a5680fc5
@ -11,3 +11,12 @@ pub mod foo {
|
|||||||
//~^ ERROR missing code example in this documentation
|
//~^ ERROR missing code example in this documentation
|
||||||
pub fn bar() {}
|
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 | | /// Some docs.
|
||||||
LL | |
|
LL | |
|
||||||
... |
|
... |
|
||||||
LL | | pub fn bar() {}
|
LL | | }
|
||||||
LL | | }
|
LL | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
|
|
||||||
|
Loading…
Reference in New Issue
Block a user