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.
This commit is contained in:
bors 2018-03-26 05:09:44 +00:00
commit 184156ed97
3 changed files with 3 additions and 3 deletions

View file

@ -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.

View file

@ -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
}

View file

@ -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`