Skip to content

Commit 8461fa5

Browse files
committedJan 12, 2020
Diagnostics should not end with a full stop
1 parent 0810210 commit 8461fa5

29 files changed

+40
-40
lines changed
 

‎src/libcore/lib.rs

+1-1
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

+3-3
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+2-2
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

+1-1
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

+1-1
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

‎src/test/ui/consts/miri_unleashed/mutable_references_ice.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | x: &UnsafeCell::new(42),
77
thread 'rustc' panicked at 'assertion failed: `(left != right)`
88
left: `Const`,
99
right: `Const`: UnsafeCells are not allowed behind references in constants. This should have been prevented statically by const qualification. If this were allowed one would be able to change a constant at one use site and other use sites could observe that mutation.', src/librustc_mir/interpret/intern.rs:LL:CC
10-
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
10+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1111

1212
error: internal compiler error: unexpected panic
1313

‎src/test/ui/duplicate_entry_error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::panic::PanicInfo;
88

99
#[lang = "panic_impl"]
1010
fn panic_impl(info: &PanicInfo) -> ! {
11-
//~^ ERROR: duplicate lang item found: `panic_impl`.
11+
//~^ ERROR: found duplicate lang item `panic_impl`
1212
loop {}
1313
}
1414

‎src/test/ui/duplicate_entry_error.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0152]: duplicate lang item found: `panic_impl`.
1+
error[E0152]: found duplicate lang item `panic_impl`
22
--> $DIR/duplicate_entry_error.rs:10:1
33
|
44
LL | / fn panic_impl(info: &PanicInfo) -> ! {
@@ -7,7 +7,7 @@ LL | | loop {}
77
LL | | }
88
| |_^
99
|
10-
= note: first defined in crate `std` (which `duplicate_entry_error` depends on).
10+
= note: first defined in crate `std` (which `duplicate_entry_error` depends on)
1111

1212
error: aborting due to previous error
1313

‎src/test/ui/error-codes/E0152.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error[E0152]: duplicate lang item found: `arc`.
1+
error[E0152]: found duplicate lang item `arc`
22
--> $DIR/E0152.rs:4:1
33
|
44
LL | struct Foo;
55
| ^^^^^^^^^^^
66
|
7-
= note: first defined in crate `alloc` (which `std` depends on).
7+
= note: first defined in crate `alloc` (which `std` depends on)
88

99
error: aborting due to previous error
1010

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fn main() {
2-
let super = 22; //~ ERROR failed to resolve: there are too many initial `super`s
2+
let super = 22; //~ ERROR failed to resolve: there are too many leading `super` keywords
33
}

‎src/test/ui/keyword/keyword-super-as-identifier.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0433]: failed to resolve: there are too many initial `super`s.
1+
error[E0433]: failed to resolve: there are too many leading `super` keywords
22
--> $DIR/keyword-super-as-identifier.rs:2:9
33
|
44
LL | let super = 22;
5-
| ^^^^^ there are too many initial `super`s.
5+
| ^^^^^ there are too many leading `super` keywords
66

77
error: aborting due to previous error
88

‎src/test/ui/keyword/keyword-super.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fn main() {
2-
let super: isize; //~ ERROR failed to resolve: there are too many initial `super`s
2+
let super: isize; //~ ERROR failed to resolve: there are too many leading `super` keywords
33
}

‎src/test/ui/keyword/keyword-super.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0433]: failed to resolve: there are too many initial `super`s.
1+
error[E0433]: failed to resolve: there are too many leading `super` keywords
22
--> $DIR/keyword-super.rs:2:9
33
|
44
LL | let super: isize;
5-
| ^^^^^ there are too many initial `super`s.
5+
| ^^^^^ there are too many leading `super` keywords
66

77
error: aborting due to previous error
88

‎src/test/ui/multi-panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn check_for_no_backtrace(test: std::process::Output) {
1010

1111
assert_eq!(it.next().map(|l| l.starts_with("thread '<unnamed>' panicked at")), Some(true));
1212
assert_eq!(it.next(), Some("note: run with `RUST_BACKTRACE=1` \
13-
environment variable to display a backtrace."));
13+
environment variable to display a backtrace"));
1414
assert_eq!(it.next().map(|l| l.starts_with("thread 'main' panicked at")), Some(true));
1515
assert_eq!(it.next(), None);
1616
}

‎src/test/ui/panic-handler/panic-handler-duplicate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ fn panic(info: &PanicInfo) -> ! {
1212
}
1313

1414
#[lang = "panic_impl"]
15-
fn panic2(info: &PanicInfo) -> ! { //~ ERROR duplicate lang item found: `panic_impl`.
15+
fn panic2(info: &PanicInfo) -> ! { //~ ERROR found duplicate lang item `panic_impl`
1616
loop {}
1717
}

‎src/test/ui/panic-handler/panic-handler-duplicate.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
error[E0152]: duplicate lang item found: `panic_impl`.
1+
error[E0152]: found duplicate lang item `panic_impl`
22
--> $DIR/panic-handler-duplicate.rs:15:1
33
|
44
LL | / fn panic2(info: &PanicInfo) -> ! {
55
LL | | loop {}
66
LL | | }
77
| |_^
88
|
9-
note: first defined here.
9+
note: first defined here
1010
--> $DIR/panic-handler-duplicate.rs:10:1
1111
|
1212
LL | / fn panic(info: &PanicInfo) -> ! {

‎src/test/ui/panic-handler/panic-handler-std.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// error-pattern: duplicate lang item found: `panic_impl`.
1+
// error-pattern: found duplicate lang item `panic_impl`
22

33

44
use std::panic::PanicInfo;

‎src/test/ui/panic-handler/panic-handler-std.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
error[E0152]: duplicate lang item found: `panic_impl`.
1+
error[E0152]: found duplicate lang item `panic_impl`
22
--> $DIR/panic-handler-std.rs:7:1
33
|
44
LL | / fn panic(info: PanicInfo) -> ! {
55
LL | | loop {}
66
LL | | }
77
| |_^
88
|
9-
= note: first defined in crate `std` (which `panic_handler_std` depends on).
9+
= note: first defined in crate `std` (which `panic_handler_std` depends on)
1010

1111
error: argument should be `&PanicInfo`
1212
--> $DIR/panic-handler-std.rs:7:16

‎src/test/ui/pattern/const-pat-ice.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
thread 'rustc' panicked at 'assertion failed: rows.iter().all(|r| r.len() == v.len())', src/librustc_mir_build/hair/pattern/_match.rs:LL:CC
2-
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
33

44
error: internal compiler error: unexpected panic
55

‎src/test/ui/resolve/impl-items-vis-unresolved.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mod state {
1818
pub struct RawFloatState;
1919
impl RawFloatState {
2020
perftools_inline! {
21-
pub(super) fn new() {} //~ ERROR failed to resolve: there are too many initial `super`s
21+
pub(super) fn new() {} //~ ERROR failed to resolve: there are too many leading `super` keywords
2222
}
2323
}
2424

‎src/test/ui/resolve/impl-items-vis-unresolved.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0433]: failed to resolve: there are too many initial `super`s.
1+
error[E0433]: failed to resolve: there are too many leading `super` keywords
22
--> $DIR/impl-items-vis-unresolved.rs:21:13
33
|
44
LL | pub(super) fn new() {}
5-
| ^^^^^ there are too many initial `super`s.
5+
| ^^^^^ there are too many leading `super` keywords.
66

77
error: aborting due to previous error
88

‎src/test/ui/super-at-top-level.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::f; //~ ERROR there are too many initial `super`s
1+
use super::f; //~ ERROR there are too many leading `super` keywords
22

33
fn main() {
44
}

‎src/test/ui/super-at-top-level.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0433]: failed to resolve: there are too many initial `super`s.
1+
error[E0433]: failed to resolve: there are too many leading `super` keywords
22
--> $DIR/super-at-top-level.rs:1:5
33
|
44
LL | use super::f;
5-
| ^^^^^ there are too many initial `super`s.
5+
| ^^^^^ there are too many leading `super` keywords
66

77
error: aborting due to previous error
88

‎src/test/ui/test-panic-abort.run.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ testing321
1818
thread 'main' panicked at 'assertion failed: `(left == right)`
1919
left: `2`,
2020
right: `5`', $DIR/test-panic-abort.rs:31:5
21-
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
21+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2222

2323

2424
failures:

0 commit comments

Comments
 (0)
Please sign in to comment.