]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-ui/doc-without-codeblock.rs
Rollup merge of #100206 - RalfJung:miri-terminfo, r=thomcc
[rust.git] / src / test / rustdoc-ui / doc-without-codeblock.rs
1 #![deny(rustdoc::missing_doc_code_examples)] //~ ERROR missing code example in this documentation
2
3 /// Some docs.
4 //~^ ERROR missing code example in this documentation
5 pub struct Foo;
6
7 /// And then, the princess died.
8 //~^ ERROR missing code example in this documentation
9 pub mod foo {
10     /// Or maybe not because she saved herself!
11     //~^ ERROR missing code example in this documentation
12     pub fn bar() {}
13 }
14
15 // This impl is here to ensure the lint isn't emitted for foreign traits implementations.
16 impl std::ops::Neg for Foo {
17     type Output = Self;
18
19     fn neg(self) -> Self::Output {
20         Self
21     }
22 }