Skip to content

Commit

Permalink
Auto merge of rust-lang#49351 - pthariensflame:patch-1, r=oli-obk
Browse files Browse the repository at this point in the history
Minor message/label formatting consistency fix.

The unimplemented label for `Termination` was missing some backticks for consistency with the message.
  • Loading branch information
bors committed Mar 26, 2018
2 parents 445fafa + 9e6991c commit 184156e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libstd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ pub fn id() -> u32 {
#[unstable(feature = "termination_trait_lib", issue = "43301")]
#[rustc_on_unimplemented(
message="`main` has invalid return type `{Self}`",
label="`main` can only return types that implement {Termination}")]
label="`main` can only return types that implement `{Termination}`")]
pub trait Termination {
/// Is called to get the representation of the value as status code.
/// This status code is returned to the operating system.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

fn main() -> i32 {
//~^ ERROR `main` has invalid return type `i32`
//~| NOTE `main` can only return types that implement std::process::Termination
//~| NOTE `main` can only return types that implement `std::process::Termination`
//~| HELP consider using `()`, or a `Result`
0
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: `main` has invalid return type `char`
--> $DIR/termination-trait-main-wrong-type.rs:11:14
|
LL | fn main() -> char { //~ ERROR
| ^^^^ `main` can only return types that implement std::process::Termination
| ^^^^ `main` can only return types that implement `std::process::Termination`
|
= help: consider using `()`, or a `Result`

Expand Down

0 comments on commit 184156e

Please sign in to comment.