rust/src/test/rustdoc-ui/lint-missing-doc-code-example.rs

40 lines
419 B
Rust
Raw Normal View History

2019-05-16 11:31:53 -05:00
#![deny(missing_docs)]
#![deny(missing_doc_code_examples)]
//! crate level doc
//! ```
//! println!("hello"):
//! ```
/// doc
///
/// ```
/// println!("hello");
/// ```
fn test() {
}
#[allow(missing_docs)]
mod module1 {
}
#[allow(missing_doc_code_examples)]
/// doc
mod module2 {
/// doc
pub fn test() {}
}
/// doc
///
/// ```
/// println!("hello");
/// ```
pub mod module3 {
/// doc
pub fn test() {}
}