From b50612702a3baea7b46d5c8c048ae0776b68ca23 Mon Sep 17 00:00:00 2001 From: mox692 <55653825+mox692@users.noreply.github.com> Date: Tue, 1 Mar 2022 14:38:41 +0000 Subject: [PATCH] Update Termination trait docs --- library/std/src/process.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/std/src/process.rs b/library/std/src/process.rs index e3fff155e4722..0892cdd6f9a34 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -2030,6 +2030,11 @@ pub fn id() -> u32 { /// /// The default implementations are returning `libc::EXIT_SUCCESS` to indicate /// a successful execution. In case of a failure, `libc::EXIT_FAILURE` is returned. +/// +/// Note that this trait is supposed to be used in standard library runtime, +/// where returned value from main function is considered meaningful. +/// On the other hand, implementing Termination in no-std environment, where +/// there is no notion of `exit status`, has no effect or may possibly cause bugs. #[cfg_attr(not(test), lang = "termination")] #[unstable(feature = "termination_trait_lib", issue = "43301")] #[rustc_on_unimplemented(