]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-ui/lint-missing-doc-code-example.rs
Rollup merge of #69031 - Centril:dyntest, r=eddyb
[rust.git] / src / test / rustdoc-ui / lint-missing-doc-code-example.rs
1 #![deny(missing_docs)]
2 #![deny(missing_doc_code_examples)]
3
4 //! crate level doc
5 //! ```
6 //! println!("hello"):
7 //! ```
8
9
10 /// doc
11 ///
12 /// ```
13 /// println!("hello");
14 /// ```
15 fn test() {
16 }
17
18 #[allow(missing_docs)]
19 mod module1 { //~ ERROR
20 }
21
22 #[allow(missing_doc_code_examples)]
23 /// doc
24 mod module2 {
25
26   /// doc
27   pub fn test() {}
28 }
29
30 /// doc
31 ///
32 /// ```
33 /// println!("hello");
34 /// ```
35 pub mod module3 {
36
37   /// doc
38   //~^ ERROR
39   pub fn test() {}
40 }