Hello,
consider this code example:
#![deny(missing_docs)]
#![deny(missing_doc_code_examples)]
//! crate level doc
//! ```
//! println!("hello"):
//! ```
/// doc
///
/// ```
/// println!("hello");
/// ```
fn test() {
}
// the allow() here works as expected, but missing_doc_code_examples still complains
#[allow(missing_docs)]
mod module1 {
fn test() {}
}
// here we want some docs but no code examples, but missing_doc_code_examples still complains
#[allow(missing_doc_code_examples)]
/// doc
mod module2 {
/// doc
fn test() {}
}
/// doc
///
/// ```
/// println!("hello");
/// ```
mod module3 {
// here we want some code examples but missing_doc_code_examples does not complain
/// doc
fn test() {}
}
Here I would expect the following behaviour when running cargo doc:
module1 has allow(missing_docs) so missing_doc_code_examples should be silent
module2 has allow(missing_doc_code_examples) yet we still get errors for missing docs on module2, I think we should not
module3 has a code example, but module3::test does not, we should get an error for the missing example on module3::test
cc @GuillaumeGomez
Hello,
consider this code example:
Here I would expect the following behaviour when running
cargo doc:module1hasallow(missing_docs)somissing_doc_code_examplesshould be silentmodule2hasallow(missing_doc_code_examples)yet we still get errors for missing docs onmodule2, I think we should notmodule3has a code example, butmodule3::testdoes not, we should get an error for the missing example onmodule3::testcc @GuillaumeGomez