Skip to content

Commit 184156e

Browse files
committed
Auto merge of #49351 - pthariensflame:patch-1, r=oli-obk
Minor message/label formatting consistency fix. The unimplemented label for `Termination` was missing some backticks for consistency with the message.
2 parents 445fafa + 9e6991c commit 184156e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/libstd/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ pub fn id() -> u32 {
14441444
#[unstable(feature = "termination_trait_lib", issue = "43301")]
14451445
#[rustc_on_unimplemented(
14461446
message="`main` has invalid return type `{Self}`",
1447-
label="`main` can only return types that implement {Termination}")]
1447+
label="`main` can only return types that implement `{Termination}`")]
14481448
pub trait Termination {
14491449
/// Is called to get the representation of the value as status code.
14501450
/// This status code is returned to the operating system.

src/test/compile-fail/rfc-1937-termination-trait/termination-trait-main-i32.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
fn main() -> i32 {
1212
//~^ ERROR `main` has invalid return type `i32`
13-
//~| NOTE `main` can only return types that implement std::process::Termination
13+
//~| NOTE `main` can only return types that implement `std::process::Termination`
1414
//~| HELP consider using `()`, or a `Result`
1515
0
1616
}

src/test/ui/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0277]: `main` has invalid return type `char`
22
--> $DIR/termination-trait-main-wrong-type.rs:11:14
33
|
44
LL | fn main() -> char { //~ ERROR
5-
| ^^^^ `main` can only return types that implement std::process::Termination
5+
| ^^^^ `main` can only return types that implement `std::process::Termination`
66
|
77
= help: consider using `()`, or a `Result`
88

0 commit comments

Comments
 (0)