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