File tree Expand file tree Collapse file tree 8 files changed +19
-19
lines changed Expand file tree Collapse file tree 8 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ pub fn look_for_tests<'tcx>(
344
344
lint:: builtin:: MISSING_DOC_CODE_EXAMPLES ,
345
345
hir_id,
346
346
sp,
347
- "Missing code example in this documentation" ) ;
347
+ "missing code example in this documentation" ) ;
348
348
diag. emit ( ) ;
349
349
} else if check_missing_code == false &&
350
350
tests. found_tests > 0 &&
@@ -353,7 +353,7 @@ pub fn look_for_tests<'tcx>(
353
353
lint:: builtin:: PRIVATE_DOC_TESTS ,
354
354
hir_id,
355
355
span_of_attrs ( & item. attrs ) . unwrap_or ( item. source . span ( ) ) ,
356
- "Documentation test in private item" ) ;
356
+ "documentation test in private item" ) ;
357
357
diag. emit ( ) ;
358
358
}
359
359
}
@@ -367,7 +367,7 @@ crate fn span_of_attrs(attrs: &clean::Attributes) -> Option<Span> {
367
367
if start == DUMMY_SP {
368
368
return None ;
369
369
}
370
- let end = attrs. doc_strings . last ( ) . expect ( "No doc strings provided" ) . span ( ) ;
370
+ let end = attrs. doc_strings . last ( ) . expect ( "no doc strings provided" ) . span ( ) ;
371
371
Some ( start. to ( end) )
372
372
}
373
373
Original file line number Diff line number Diff line change 1
- #![ deny( missing_doc_code_examples) ] //~ ERROR Missing code example in this documentation
1
+ #![ deny( missing_doc_code_examples) ] //~ ERROR missing code example in this documentation
2
2
3
3
/// Some docs.
4
- //~^ ERROR Missing code example in this documentation
4
+ //~^ ERROR missing code example in this documentation
5
5
pub struct Foo ;
6
6
7
7
/// And then, the princess died.
8
- //~^ ERROR Missing code example in this documentation
8
+ //~^ ERROR missing code example in this documentation
9
9
pub mod foo {
10
10
/// Or maybe not because she saved herself!
11
- //~^ ERROR Missing code example in this documentation
11
+ //~^ ERROR missing code example in this documentation
12
12
pub fn bar ( ) { }
13
13
}
Original file line number Diff line number Diff line change 1
- error: Missing code example in this documentation
1
+ error: missing code example in this documentation
2
2
--> $DIR/doc-without-codeblock.rs:1:1
3
3
|
4
4
LL | / #![deny(missing_doc_code_examples)]
@@ -16,19 +16,19 @@ note: lint level defined here
16
16
LL | #![deny(missing_doc_code_examples)]
17
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^
18
18
19
- error: Missing code example in this documentation
19
+ error: missing code example in this documentation
20
20
--> $DIR/doc-without-codeblock.rs:3:1
21
21
|
22
22
LL | /// Some docs.
23
23
| ^^^^^^^^^^^^^^
24
24
25
- error: Missing code example in this documentation
25
+ error: missing code example in this documentation
26
26
--> $DIR/doc-without-codeblock.rs:7:1
27
27
|
28
28
LL | /// And then, the princess died.
29
29
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30
30
31
- error: Missing code example in this documentation
31
+ error: missing code example in this documentation
32
32
--> $DIR/doc-without-codeblock.rs:10:5
33
33
|
34
34
LL | /// Or maybe not because she saved herself!
Original file line number Diff line number Diff line change 14
14
pub fn link_error ( ) { } //~^^^^^ ERROR cannot be resolved, ignoring it
15
15
16
16
/// wait, this doesn't have a doctest?
17
- pub fn no_doctest ( ) { } //~^ ERROR Missing code example in this documentation
17
+ pub fn no_doctest ( ) { } //~^ ERROR missing code example in this documentation
18
18
19
19
/// wait, this *does* have a doctest?
20
20
///
21
21
/// ```
22
22
/// println!("sup");
23
23
/// ```
24
- fn private_doctest ( ) { } //~^^^^^ ERROR Documentation test in private item
24
+ fn private_doctest ( ) { } //~^^^^^ ERROR documentation test in private item
Original file line number Diff line number Diff line change 1
- error: Documentation test in private item
1
+ error: documentation test in private item
2
2
--> $DIR/lint-group.rs:19:1
3
3
|
4
4
LL | / /// wait, this *does* have a doctest?
@@ -29,7 +29,7 @@ LL | #![deny(rustdoc)]
29
29
= note: `#[deny(intra_doc_link_resolution_failure)]` implied by `#[deny(rustdoc)]`
30
30
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
31
31
32
- error: Missing code example in this documentation
32
+ error: missing code example in this documentation
33
33
--> $DIR/lint-group.rs:16:1
34
34
|
35
35
LL | /// wait, this doesn't have a doctest?
Original file line number Diff line number Diff line change 1
- error: Missing code example in this documentation
1
+ error: missing code example in this documentation
2
2
--> $DIR/lint-missing-doc-code-example.rs:19:1
3
3
|
4
4
LL | / mod module1 {
@@ -11,7 +11,7 @@ note: lint level defined here
11
11
LL | #![deny(missing_doc_code_examples)]
12
12
| ^^^^^^^^^^^^^^^^^^^^^^^^^
13
13
14
- error: Missing code example in this documentation
14
+ error: missing code example in this documentation
15
15
--> $DIR/lint-missing-doc-code-example.rs:37:3
16
16
|
17
17
LL | /// doc
Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ mod foo {
6
6
/// ```
7
7
/// assert!(false);
8
8
/// ```
9
- //~^^^^^ ERROR Documentation test in private item
9
+ //~^^^^^ ERROR documentation test in private item
10
10
fn bar ( ) { }
11
11
}
Original file line number Diff line number Diff line change 1
- error: Documentation test in private item
1
+ error: documentation test in private item
2
2
--> $DIR/private-item-doc-test.rs:4:5
3
3
|
4
4
LL | / /// private doc test
You can’t perform that action at this time.
0 commit comments