From 99a108c03654cd9d2df21223eb55a5dfd6552cb8 Mon Sep 17 00:00:00 2001 From: Bastian Köcher Date: Thu, 21 Dec 2017 12:03:01 +0100 Subject: Fixes compilation errors and adds proposed improvements --- src/libstd/termination.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libstd') diff --git a/src/libstd/termination.rs b/src/libstd/termination.rs index a08d3dd2d52..5eeaa542b41 100644 --- a/src/libstd/termination.rs +++ b/src/libstd/termination.rs @@ -21,6 +21,8 @@ use libc; /// a successful execution. In case of a failure, `libc::EXIT_FAILURE` is returned. #[cfg_attr(not(stage0), lang = "termination")] #[unstable(feature = "termination_trait", issue = "0")] +#[rustc_on_unimplemented = + "`main` can only return types that implement {Termination}, not `{Self}`"] pub trait Termination { /// Is called to get the representation of the value as status code. /// This status code is returned to the operating system. -- cgit 1.4.1-3-g733a5