about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2018-03-21 23:28:48 -0500
committerTyler Mandry <tmandry@gmail.com>2018-03-21 23:28:48 -0500
commit2b13d95da02d318c12814261dd36edd91ae6879e (patch)
tree496531b2071968ef08cd59a8d756a8a2a2206100 /src/libstd
parentb6934c91b23517c4e17d8016b6c46ffd0703eded (diff)
downloadrust-2b13d95da02d318c12814261dd36edd91ae6879e.tar.gz
rust-2b13d95da02d318c12814261dd36edd91ae6879e.zip
termination_trait: Make error message more helpful
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/process.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index d5ac2d19e83..c877bf6aa35 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -1442,8 +1442,9 @@ pub fn id() -> u32 {
 /// a successful execution. In case of a failure, `libc::EXIT_FAILURE` is returned.
 #[cfg_attr(not(test), lang = "termination")]
 #[unstable(feature = "termination_trait_lib", issue = "43301")]
-#[rustc_on_unimplemented =
-  "`main` can only return types that implement {Termination}, not `{Self}`"]
+#[rustc_on_unimplemented(
+  message="`main` has invalid return type `{Self}`",
+  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.