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>(
344344 lint:: builtin:: MISSING_DOC_CODE_EXAMPLES ,
345345 hir_id,
346346 sp,
347- "Missing code example in this documentation" ) ;
347+ "missing code example in this documentation" ) ;
348348 diag. emit ( ) ;
349349 } else if check_missing_code == false &&
350350 tests. found_tests > 0 &&
@@ -353,7 +353,7 @@ pub fn look_for_tests<'tcx>(
353353 lint:: builtin:: PRIVATE_DOC_TESTS ,
354354 hir_id,
355355 span_of_attrs ( & item. attrs ) . unwrap_or ( item. source . span ( ) ) ,
356- "Documentation test in private item" ) ;
356+ "documentation test in private item" ) ;
357357 diag. emit ( ) ;
358358 }
359359}
@@ -367,7 +367,7 @@ crate fn span_of_attrs(attrs: &clean::Attributes) -> Option<Span> {
367367 if start == DUMMY_SP {
368368 return None ;
369369 }
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 ( ) ;
371371 Some ( start. to ( end) )
372372}
373373
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
22
33/// Some docs.
4- //~^ ERROR Missing code example in this documentation
4+ //~^ ERROR missing code example in this documentation
55pub struct Foo ;
66
77/// And then, the princess died.
8- //~^ ERROR Missing code example in this documentation
8+ //~^ ERROR missing code example in this documentation
99pub mod foo {
1010 /// Or maybe not because she saved herself!
11- //~^ ERROR Missing code example in this documentation
11+ //~^ ERROR missing code example in this documentation
1212 pub fn bar ( ) { }
1313}
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
22 --> $DIR/doc-without-codeblock.rs:1:1
33 |
44LL | / #![deny(missing_doc_code_examples)]
@@ -16,19 +16,19 @@ note: lint level defined here
1616LL | #![deny(missing_doc_code_examples)]
1717 | ^^^^^^^^^^^^^^^^^^^^^^^^^
1818
19- error: Missing code example in this documentation
19+ error: missing code example in this documentation
2020 --> $DIR/doc-without-codeblock.rs:3:1
2121 |
2222LL | /// Some docs.
2323 | ^^^^^^^^^^^^^^
2424
25- error: Missing code example in this documentation
25+ error: missing code example in this documentation
2626 --> $DIR/doc-without-codeblock.rs:7:1
2727 |
2828LL | /// And then, the princess died.
2929 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3030
31- error: Missing code example in this documentation
31+ error: missing code example in this documentation
3232 --> $DIR/doc-without-codeblock.rs:10:5
3333 |
3434LL | /// Or maybe not because she saved herself!
Original file line number Diff line number Diff line change 1414pub fn link_error ( ) { } //~^^^^^ ERROR cannot be resolved, ignoring it
1515
1616/// 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
1818
1919/// wait, this *does* have a doctest?
2020///
2121/// ```
2222/// println!("sup");
2323/// ```
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
22 --> $DIR/lint-group.rs:19:1
33 |
44LL | / /// wait, this *does* have a doctest?
@@ -29,7 +29,7 @@ LL | #![deny(rustdoc)]
2929 = note: `#[deny(intra_doc_link_resolution_failure)]` implied by `#[deny(rustdoc)]`
3030 = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
3131
32- error: Missing code example in this documentation
32+ error: missing code example in this documentation
3333 --> $DIR/lint-group.rs:16:1
3434 |
3535LL | /// 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
22 --> $DIR/lint-missing-doc-code-example.rs:19:1
33 |
44LL | / mod module1 {
@@ -11,7 +11,7 @@ note: lint level defined here
1111LL | #![deny(missing_doc_code_examples)]
1212 | ^^^^^^^^^^^^^^^^^^^^^^^^^
1313
14- error: Missing code example in this documentation
14+ error: missing code example in this documentation
1515 --> $DIR/lint-missing-doc-code-example.rs:37:3
1616 |
1717LL | /// doc
Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ mod foo {
66 /// ```
77 /// assert!(false);
88 /// ```
9- //~^^^^^ ERROR Documentation test in private item
9+ //~^^^^^ ERROR documentation test in private item
1010 fn bar ( ) { }
1111}
Original file line number Diff line number Diff line change 1- error: Documentation test in private item
1+ error: documentation test in private item
22 --> $DIR/private-item-doc-test.rs:4:5
33 |
44LL | / /// private doc test
You can’t perform that action at this time.
0 commit comments