File tree Expand file tree Collapse file tree 4 files changed +38
-8
lines changed Expand file tree Collapse file tree 4 files changed +38
-8
lines changed Original file line number Diff line number Diff line change 1- //~ ERROR Missing code example in this documentation
2-
3- #![ deny( missing_doc_code_examples) ]
1+ #![ deny( missing_doc_code_examples) ] //~ ERROR Missing code example in this documentation
42
53/// Some docs.
64//~^ ERROR Missing code example in this documentation
Original file line number Diff line number Diff line change 11error: Missing code example in this documentation
2+ --> $DIR/doc-without-codeblock.rs:1:1
3+ |
4+ LL | / #![deny(missing_doc_code_examples)]
5+ LL | |
6+ LL | | /// Some docs.
7+ LL | |
8+ ... |
9+ LL | | pub fn bar() {}
10+ LL | | }
11+ | |_^
212 |
313note: lint level defined here
4- --> $DIR/doc-without-codeblock.rs:3 :9
14+ --> $DIR/doc-without-codeblock.rs:1 :9
515 |
616LL | #![deny(missing_doc_code_examples)]
717 | ^^^^^^^^^^^^^^^^^^^^^^^^^
818
919error: Missing code example in this documentation
10- --> $DIR/doc-without-codeblock.rs:5 :1
20+ --> $DIR/doc-without-codeblock.rs:3 :1
1121 |
1222LL | /// Some docs.
1323 | ^^^^^^^^^^^^^^
1424
1525error: Missing code example in this documentation
16- --> $DIR/doc-without-codeblock.rs:9 :1
26+ --> $DIR/doc-without-codeblock.rs:7 :1
1727 |
1828LL | /// And then, the princess died.
1929 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2030
2131error: Missing code example in this documentation
22- --> $DIR/doc-without-codeblock.rs:12 :5
32+ --> $DIR/doc-without-codeblock.rs:10 :5
2333 |
2434LL | /// Or maybe not because she saved herself!
2535 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ fn test() {
1616}
1717
1818#[ allow( missing_docs) ]
19- mod module1 {
19+ mod module1 { //~ ERROR
2020}
2121
2222#[ allow( missing_doc_code_examples) ]
@@ -35,5 +35,6 @@ mod module2 {
3535pub mod module3 {
3636
3737 /// doc
38+ //~^ ERROR
3839 pub fn test ( ) { }
3940}
Original file line number Diff line number Diff line change 1+ error: Missing code example in this documentation
2+ --> $DIR/lint-missing-doc-code-example.rs:19:1
3+ |
4+ LL | / mod module1 {
5+ LL | | }
6+ | |_^
7+ |
8+ note: lint level defined here
9+ --> $DIR/lint-missing-doc-code-example.rs:2:9
10+ |
11+ LL | #![deny(missing_doc_code_examples)]
12+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
13+
14+ error: Missing code example in this documentation
15+ --> $DIR/lint-missing-doc-code-example.rs:37:3
16+ |
17+ LL | /// doc
18+ | ^^^^^^^
19+
20+ error: aborting due to 2 previous errors
21+
You can’t perform that action at this time.
0 commit comments