Skip to content

Commit 74823fc

Browse files
committed
Diagnostics should start lowercase
1 parent 543b7d9 commit 74823fc

File tree

39 files changed

+160
-160
lines changed

39 files changed

+160
-160
lines changed

src/librustc/traits/error_reporting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
11561156
err.span_help(impl_span, "trait impl with same name found");
11571157
let trait_crate = self.tcx.crate_name(trait_with_same_path.krate);
11581158
let crate_msg = format!(
1159-
"Perhaps two different versions of crate `{}` are being used?",
1159+
"perhaps two different versions of crate `{}` are being used?",
11601160
trait_crate
11611161
);
11621162
err.note(&crate_msg);

src/librustc_ast_passes/feature_gate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
440440
self.check_extern(bare_fn_ty.ext);
441441
}
442442
ast::TyKind::Never => {
443-
gate_feature_post!(&self, never_type, ty.span, "The `!` type is experimental");
443+
gate_feature_post!(&self, never_type, ty.span, "the `!` type is experimental");
444444
}
445445
_ => {}
446446
}

src/librustc_builtin_macros/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ fn should_panic(cx: &ExtCtxt<'_>, i: &ast::Item) -> ShouldPanic {
325325
`expected = \"error message\"`",
326326
)
327327
.note(
328-
"Errors in this attribute were erroneously \
328+
"errors in this attribute were erroneously \
329329
allowed and will become a hard error in a \
330330
future release.",
331331
)

src/librustc_lint/builtin.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ impl EarlyLintPass for AnonymousParameters {
657657
)
658658
.span_suggestion(
659659
arg.pat.span,
660-
"Try naming the parameter or explicitly \
660+
"try naming the parameter or explicitly \
661661
ignoring it",
662662
format!("_: {}", ty_snip),
663663
appl,
@@ -1934,21 +1934,21 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidValue {
19341934
use rustc::ty::TyKind::*;
19351935
match ty.kind {
19361936
// Primitive types that don't like 0 as a value.
1937-
Ref(..) => Some((format!("References must be non-null"), None)),
1937+
Ref(..) => Some((format!("references must be non-null"), None)),
19381938
Adt(..) if ty.is_box() => Some((format!("`Box` must be non-null"), None)),
1939-
FnPtr(..) => Some((format!("Function pointers must be non-null"), None)),
1940-
Never => Some((format!("The never type (`!`) has no valid value"), None)),
1939+
FnPtr(..) => Some((format!("function pointers must be non-null"), None)),
1940+
Never => Some((format!("the `!` type has no valid value"), None)),
19411941
RawPtr(tm) if matches!(tm.ty.kind, Dynamic(..)) =>
19421942
// raw ptr to dyn Trait
19431943
{
1944-
Some((format!("The vtable of a wide raw pointer must be non-null"), None))
1944+
Some((format!("the vtable of a wide raw pointer must be non-null"), None))
19451945
}
19461946
// Primitive types with other constraints.
19471947
Bool if init == InitKind::Uninit => {
1948-
Some((format!("Booleans must be `true` or `false`"), None))
1948+
Some((format!("booleans must be either `true` or `false`"), None))
19491949
}
19501950
Char if init == InitKind::Uninit => {
1951-
Some((format!("Characters must be a valid unicode codepoint"), None))
1951+
Some((format!("characters must be a valid Unicode codepoint"), None))
19521952
}
19531953
// Recurse and checks for some compound types.
19541954
Adt(adt_def, substs) if !adt_def.is_union() => {

src/librustc_mir/borrow_check/nll.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ pub(super) fn dump_annotation<'a, 'tcx>(
368368
// better.
369369

370370
if let Some(closure_region_requirements) = closure_region_requirements {
371-
let mut err = tcx.sess.diagnostic().span_note_diag(body.span, "External requirements");
371+
let mut err = tcx.sess.diagnostic().span_note_diag(body.span, "external requirements");
372372

373373
regioncx.annotate(tcx, &mut err);
374374

@@ -387,7 +387,7 @@ pub(super) fn dump_annotation<'a, 'tcx>(
387387

388388
err.buffer(errors_buffer);
389389
} else {
390-
let mut err = tcx.sess.diagnostic().span_note_diag(body.span, "No external requirements");
390+
let mut err = tcx.sess.diagnostic().span_note_diag(body.span, "no external requirements");
391391
regioncx.annotate(tcx, &mut err);
392392

393393
err.buffer(errors_buffer);

src/librustc_typeck/check/cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
381381
if unknown_cast_to { "to" } else { "from" }
382382
);
383383
err.note(
384-
"The type information given here is insufficient to check whether \
384+
"the type information given here is insufficient to check whether \
385385
the pointer cast is valid",
386386
);
387387
if unknown_cast_to {

src/test/ui/anon-params-deprecated.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ warning: anonymous parameters are deprecated and will be removed in the next edi
22
--> $DIR/anon-params-deprecated.rs:9:12
33
|
44
LL | fn foo(i32);
5-
| ^^^ help: Try naming the parameter or explicitly ignoring it: `_: i32`
5+
| ^^^ help: try naming the parameter or explicitly ignoring it: `_: i32`
66
|
77
note: lint level defined here
88
--> $DIR/anon-params-deprecated.rs:1:9
@@ -16,7 +16,7 @@ warning: anonymous parameters are deprecated and will be removed in the next edi
1616
--> $DIR/anon-params-deprecated.rs:12:30
1717
|
1818
LL | fn bar_with_default_impl(String, String) {}
19-
| ^^^^^^ help: Try naming the parameter or explicitly ignoring it: `_: String`
19+
| ^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: String`
2020
|
2121
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
2222
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
@@ -25,7 +25,7 @@ warning: anonymous parameters are deprecated and will be removed in the next edi
2525
--> $DIR/anon-params-deprecated.rs:12:38
2626
|
2727
LL | fn bar_with_default_impl(String, String) {}
28-
| ^^^^^^ help: Try naming the parameter or explicitly ignoring it: `_: String`
28+
| ^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: String`
2929
|
3030
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
3131
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>

src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ LL | unsafe { std::mem::transmute(()) }
3434
| help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
3535
|
3636
= note: `#[warn(invalid_value)]` on by default
37-
= note: The never type (`!`) has no valid value
37+
= note: the `!` type has no valid value
3838

3939
warning: the type `Empty` does not permit zero-initialization
4040
--> $DIR/validate_uninhabited_zsts.rs:17:35

src/test/ui/feature-gates/feature-gate-never_type.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: The `!` type is experimental
1+
error[E0658]: the `!` type is experimental
22
--> $DIR/feature-gate-never_type.rs:7:17
33
|
44
LL | type Ma = (u32, !, i32);
@@ -7,7 +7,7 @@ LL | type Ma = (u32, !, i32);
77
= note: for more information, see https://github.com/rust-lang/rust/issues/35121
88
= help: add `#![feature(never_type)]` to the crate attributes to enable
99

10-
error[E0658]: The `!` type is experimental
10+
error[E0658]: the `!` type is experimental
1111
--> $DIR/feature-gate-never_type.rs:8:20
1212
|
1313
LL | type Meeshka = Vec<!>;
@@ -16,7 +16,7 @@ LL | type Meeshka = Vec<!>;
1616
= note: for more information, see https://github.com/rust-lang/rust/issues/35121
1717
= help: add `#![feature(never_type)]` to the crate attributes to enable
1818

19-
error[E0658]: The `!` type is experimental
19+
error[E0658]: the `!` type is experimental
2020
--> $DIR/feature-gate-never_type.rs:9:24
2121
|
2222
LL | type Mow = &'static fn(!) -> !;
@@ -25,7 +25,7 @@ LL | type Mow = &'static fn(!) -> !;
2525
= note: for more information, see https://github.com/rust-lang/rust/issues/35121
2626
= help: add `#![feature(never_type)]` to the crate attributes to enable
2727

28-
error[E0658]: The `!` type is experimental
28+
error[E0658]: the `!` type is experimental
2929
--> $DIR/feature-gate-never_type.rs:10:27
3030
|
3131
LL | type Skwoz = &'static mut !;
@@ -34,7 +34,7 @@ LL | type Skwoz = &'static mut !;
3434
= note: for more information, see https://github.com/rust-lang/rust/issues/35121
3535
= help: add `#![feature(never_type)]` to the crate attributes to enable
3636

37-
error[E0658]: The `!` type is experimental
37+
error[E0658]: the `!` type is experimental
3838
--> $DIR/feature-gate-never_type.rs:13:16
3939
|
4040
LL | type Wub = !;

src/test/ui/future-incompatible-lint-group.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: anonymous parameters are deprecated and will be removed in the next editi
22
--> $DIR/future-incompatible-lint-group.rs:4:10
33
|
44
LL | fn f(u8) {}
5-
| ^^ help: Try naming the parameter or explicitly ignoring it: `_: u8`
5+
| ^^ help: try naming the parameter or explicitly ignoring it: `_: u8`
66
|
77
note: lint level defined here
88
--> $DIR/future-incompatible-lint-group.rs:1:9

src/test/ui/issues/issue-45730.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | let x: *const _ = 0 as _;
66
| |
77
| help: consider giving more type information
88
|
9-
= note: The type information given here is insufficient to check whether the pointer cast is valid
9+
= note: the type information given here is insufficient to check whether the pointer cast is valid
1010

1111
error[E0641]: cannot cast to a pointer of an unknown kind
1212
--> $DIR/issue-45730.rs:5:23
@@ -16,7 +16,7 @@ LL | let x: *const _ = 0 as *const _;
1616
| |
1717
| help: consider giving more type information
1818
|
19-
= note: The type information given here is insufficient to check whether the pointer cast is valid
19+
= note: the type information given here is insufficient to check whether the pointer cast is valid
2020

2121
error[E0641]: cannot cast to a pointer of an unknown kind
2222
--> $DIR/issue-45730.rs:8:13
@@ -26,7 +26,7 @@ LL | let x = 0 as *const i32 as *const _ as *mut _;
2626
| |
2727
| help: consider giving more type information
2828
|
29-
= note: The type information given here is insufficient to check whether the pointer cast is valid
29+
= note: the type information given here is insufficient to check whether the pointer cast is valid
3030

3131
error: aborting due to 3 previous errors
3232

0 commit comments

Comments
 (0)