Skip to content

Commit 84c8849

Browse files
committed
Diagnostics should not end with a full stop
1 parent 74823fc commit 84c8849

29 files changed

+40
-40
lines changed

src/libcore/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
// Here we explicitly #[cfg]-out this whole crate when testing. If we don't do
4545
// this, both the generated test artifact and the linked libtest (which
4646
// transitively includes libcore) will both define the same set of lang items,
47-
// and this will cause the E0152 "duplicate lang item found" error. See
47+
// and this will cause the E0152 "found duplicate lang item" error. See
4848
// discussion in #50466 for details.
4949
//
5050
// This cfg won't affect doc tests.

src/librustc/middle/lang_items.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl LanguageItemCollector<'tcx> {
184184
self.tcx.sess,
185185
span,
186186
E0152,
187-
"duplicate lang item found: `{}`.",
187+
"found duplicate lang item `{}`",
188188
name
189189
),
190190
None => {
@@ -206,12 +206,12 @@ impl LanguageItemCollector<'tcx> {
206206
},
207207
};
208208
if let Some(span) = self.tcx.hir().span_if_local(original_def_id) {
209-
err.span_note(span, "first defined here.");
209+
err.span_note(span, "first defined here");
210210
} else {
211211
match self.tcx.extern_crate(original_def_id) {
212212
Some(ExternCrate {dependency_of, ..}) => {
213213
err.note(&format!(
214-
"first defined in crate `{}` (which `{}` depends on).",
214+
"first defined in crate `{}` (which `{}` depends on)",
215215
self.tcx.crate_name(original_def_id.krate),
216216
self.tcx.crate_name(*dependency_of)));
217217
},

src/librustc_passes/diagnostic_items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fn collect_item(
7373
)),
7474
};
7575
if let Some(span) = tcx.hir().span_if_local(original_def_id) {
76-
err.span_note(span, "first defined here.");
76+
err.span_note(span, "first defined here");
7777
} else {
7878
err.note(&format!(
7979
"first defined in crate `{}`.",

src/librustc_resolve/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2006,7 +2006,7 @@ impl<'a> Resolver<'a> {
20062006
continue;
20072007
}
20082008
}
2009-
let msg = "there are too many initial `super`s.".to_string();
2009+
let msg = "there are too many leading `super` keywords".to_string();
20102010
return PathResult::Failed {
20112011
span: ident.span,
20122012
label: msg,

src/librustc_typeck/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ fn check_opaque_for_cycles<'tcx>(
16641664
if let hir::OpaqueTyOrigin::AsyncFn = origin {
16651665
struct_span_err!(tcx.sess, span, E0733, "recursion in an `async fn` requires boxing",)
16661666
.span_label(span, "recursive `async fn`")
1667-
.note("a recursive `async fn` must be rewritten to return a boxed `dyn Future`.")
1667+
.note("a recursive `async fn` must be rewritten to return a boxed `dyn Future`")
16681668
.emit();
16691669
} else {
16701670
let mut err =

src/libstd/panicking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ fn default_hook(info: &PanicInfo<'_>) {
199199
let _ = writeln!(
200200
err,
201201
"note: run with `RUST_BACKTRACE=1` \
202-
environment variable to display a backtrace."
202+
environment variable to display a backtrace"
203203
);
204204
}
205205
}

src/test/compile-fail/panic-handler-twice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use core::panic::PanicInfo;
1010

1111
#[panic_handler]
1212
fn panic(info: &PanicInfo) -> ! {
13-
//~^ error duplicate lang item found: `panic_impl`
13+
//~^ ERROR found duplicate lang item `panic_impl`
1414
loop {}
1515
}
1616

src/test/ui/async-await/mutually-recursive-async-impl-trait-type.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ error[E0733]: recursion in an `async fn` requires boxing
44
LL | async fn rec_1() {
55
| ^ recursive `async fn`
66
|
7-
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`.
7+
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
88

99
error[E0733]: recursion in an `async fn` requires boxing
1010
--> $DIR/mutually-recursive-async-impl-trait-type.rs:9:18
1111
|
1212
LL | async fn rec_2() {
1313
| ^ recursive `async fn`
1414
|
15-
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`.
15+
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
1616

1717
error: aborting due to 2 previous errors
1818

src/test/ui/async-await/recursive-async-impl-trait-type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0733]: recursion in an `async fn` requires boxing
44
LL | async fn recursive_async_function() -> () {
55
| ^^ recursive `async fn`
66
|
7-
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`.
7+
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
88

99
error: aborting due to previous error
1010

src/test/ui/consts/miri_unleashed/mutable_const2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *m
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

1313
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:346:17
14-
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
14+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1515

1616
error: internal compiler error: unexpected panic
1717

0 commit comments

Comments
 (0)