Skip to content

Commit 2aca599

Browse files
authored
Rollup merge of rust-lang#95207 - ZHANGWENTAI:update_termination_doc, r=yaahc
update Termination trait docs this pr add some statement about intending to provide `Termination` trait only on standard library's runtime. from rust-lang#93448 r? `@Lokathor`
2 parents 5d3dfb4 + 71e3423 commit 2aca599

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+
/// Because different runtimes have different specifications on the return value
2035+
/// of the `main` function, this trait is likely to be available only on
2036+
/// standard library's runtime for convenience. Other runtimes are not required
2037+
/// to provide similar functionality.
20332038
#[cfg_attr(not(test), lang = "termination")]
20342039
#[unstable(feature = "termination_trait_lib", issue = "43301")]
20352040
#[rustc_on_unimplemented(

0 commit comments

Comments
 (0)