File tree 4 files changed +38
-8
lines changed
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
4
2
5
3
/// Some docs.
6
4
//~^ ERROR Missing code example in this documentation
Original file line number Diff line number Diff line change 1
1
error: 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
+ | |_^
2
12
|
3
13
note: lint level defined here
4
- --> $DIR/doc-without-codeblock.rs:3 :9
14
+ --> $DIR/doc-without-codeblock.rs:1 :9
5
15
|
6
16
LL | #![deny(missing_doc_code_examples)]
7
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^
8
18
9
19
error: Missing code example in this documentation
10
- --> $DIR/doc-without-codeblock.rs:5 :1
20
+ --> $DIR/doc-without-codeblock.rs:3 :1
11
21
|
12
22
LL | /// Some docs.
13
23
| ^^^^^^^^^^^^^^
14
24
15
25
error: Missing code example in this documentation
16
- --> $DIR/doc-without-codeblock.rs:9 :1
26
+ --> $DIR/doc-without-codeblock.rs:7 :1
17
27
|
18
28
LL | /// And then, the princess died.
19
29
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
30
21
31
error: Missing code example in this documentation
22
- --> $DIR/doc-without-codeblock.rs:12 :5
32
+ --> $DIR/doc-without-codeblock.rs:10 :5
23
33
|
24
34
LL | /// Or maybe not because she saved herself!
25
35
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ fn test() {
16
16
}
17
17
18
18
#[ allow( missing_docs) ]
19
- mod module1 {
19
+ mod module1 { //~ ERROR
20
20
}
21
21
22
22
#[ allow( missing_doc_code_examples) ]
@@ -35,5 +35,6 @@ mod module2 {
35
35
pub mod module3 {
36
36
37
37
/// doc
38
+ //~^ ERROR
38
39
pub fn test ( ) { }
39
40
}
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