File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -2030,6 +2030,11 @@ pub fn id() -> u32 {
2030
2030
///
2031
2031
/// The default implementations are returning `libc::EXIT_SUCCESS` to indicate
2032
2032
/// 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.
2033
2038
#[ cfg_attr( not( test) , lang = "termination" ) ]
2034
2039
#[ unstable( feature = "termination_trait_lib" , issue = "43301" ) ]
2035
2040
#[ rustc_on_unimplemented(
You can’t perform that action at this time.
0 commit comments