Skip to content

Commit b506127

Browse files
committed
Update Termination trait docs
1 parent 035a717 commit b506127

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/std/src/process.rs

+5
Original file line numberDiff line numberDiff line change
@@ -2030,6 +2030,11 @@ pub fn id() -> u32 {
20302030
///
20312031
/// The default implementations are returning `libc::EXIT_SUCCESS` to indicate
20322032
/// a successful execution. In case of a failure, `libc::EXIT_FAILURE` is returned.
2033+
///
2034+
/// Note that this trait is supposed to be used in standard library runtime,
2035+
/// where returned value from main function is considered meaningful.
2036+
/// On the other hand, implementing Termination in no-std environment, where
2037+
/// there is no notion of `exit status`, has no effect or may possibly cause bugs.
20332038
#[cfg_attr(not(test), lang = "termination")]
20342039
#[unstable(feature = "termination_trait_lib", issue = "43301")]
20352040
#[rustc_on_unimplemented(

0 commit comments

Comments
 (0)