Skip to content

Commit e5816a7

Browse files
committed
Fix some rustdoc error capitalization
1 parent f11759d commit e5816a7

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/librustdoc/passes/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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
55
pub 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
99
pub 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
}

src/test/rustdoc-ui/doc-without-codeblock.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
|
44
LL | / #![deny(missing_doc_code_examples)]
@@ -16,19 +16,19 @@ note: lint level defined here
1616
LL | #![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
|
2222
LL | /// 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
|
2828
LL | /// 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
|
3434
LL | /// Or maybe not because she saved herself!

src/test/rustdoc-ui/lint-group.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
pub 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

src/test/rustdoc-ui/lint-group.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: Documentation test in private item
1+
error: documentation test in private item
22
--> $DIR/lint-group.rs:19:1
33
|
44
LL | / /// 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
|
3535
LL | /// wait, this doesn't have a doctest?

src/test/rustdoc-ui/lint-missing-doc-code-example.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
|
44
LL | / mod module1 {
@@ -11,7 +11,7 @@ note: lint level defined here
1111
LL | #![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
|
1717
LL | /// doc

src/test/rustdoc-ui/private-item-doc-test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

src/test/rustdoc-ui/private-item-doc-test.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: Documentation test in private item
1+
error: documentation test in private item
22
--> $DIR/private-item-doc-test.rs:4:5
33
|
44
LL | / /// private doc test

0 commit comments

Comments
 (0)