Fix lints handling in rustdoc
This commit is contained in:
parent
548add7f61
commit
b5d4bd2a07
6 changed files with 85 additions and 17 deletions
39
src/test/rustdoc-ui/lint-missing-doc-code-example.rs
Normal file
39
src/test/rustdoc-ui/lint-missing-doc-code-example.rs
Normal file
|
@ -0,0 +1,39 @@
|
|||
#![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() {}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue