mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-21 19:33:16 +00:00
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:
commit
184156ed97
@ -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.
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user