diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-05-16 18:31:53 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-05-18 12:45:29 +0200 |
| commit | b5d4bd2a07218a6cd61bace73d7910a3f1a117c4 (patch) | |
| tree | 67d32e298d1c6b37f4fdec0fa0df93a7dd527cf6 /src/test/rustdoc-ui/lint-missing-doc-code-example.rs | |
| parent | 548add7f61bfcbe3bea3f5ccefb53c84da8fefe4 (diff) | |
| download | rust-b5d4bd2a07218a6cd61bace73d7910a3f1a117c4.tar.gz rust-b5d4bd2a07218a6cd61bace73d7910a3f1a117c4.zip | |
Fix lints handling in rustdoc
Diffstat (limited to 'src/test/rustdoc-ui/lint-missing-doc-code-example.rs')
| -rw-r--r-- | src/test/rustdoc-ui/lint-missing-doc-code-example.rs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/lint-missing-doc-code-example.rs b/src/test/rustdoc-ui/lint-missing-doc-code-example.rs new file mode 100644 index 00000000000..3bb1a2b7bef --- /dev/null +++ b/src/test/rustdoc-ui/lint-missing-doc-code-example.rs @@ -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() {} +} |
