diff options
Diffstat (limited to 'src/test/rustdoc-ui/doc-without-codeblock.rs')
| -rw-r--r-- | src/test/rustdoc-ui/doc-without-codeblock.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/doc-without-codeblock.rs b/src/test/rustdoc-ui/doc-without-codeblock.rs index 6812a454157..315fca19587 100644 --- a/src/test/rustdoc-ui/doc-without-codeblock.rs +++ b/src/test/rustdoc-ui/doc-without-codeblock.rs @@ -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 + } +} |
