2022-09-12 13:10:35 -05:00
|
|
|
#![feature(rustdoc_missing_doc_code_examples)] //~ ERROR missing code example in this documentation
|
|
|
|
#![deny(rustdoc::missing_doc_code_examples)]
|
2018-10-09 09:46:29 -05:00
|
|
|
|
|
|
|
/// Some docs.
|
2019-11-24 20:42:22 -06:00
|
|
|
//~^ ERROR missing code example in this documentation
|
2018-10-09 09:46:29 -05:00
|
|
|
pub struct Foo;
|
|
|
|
|
|
|
|
/// And then, the princess died.
|
2019-11-24 20:42:22 -06:00
|
|
|
//~^ ERROR missing code example in this documentation
|
2018-10-09 09:46:29 -05:00
|
|
|
pub mod foo {
|
|
|
|
/// Or maybe not because she saved herself!
|
2019-11-24 20:42:22 -06:00
|
|
|
//~^ ERROR missing code example in this documentation
|
2018-10-09 09:46:29 -05:00
|
|
|
pub fn bar() {}
|
|
|
|
}
|
2021-10-20 08:57:44 -05:00
|
|
|
|
|
|
|
// 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
|
|
|
|
}
|
|
|
|
}
|