From 6e971a8bc28705018f735bc075cb79ddd495601f Mon Sep 17 00:00:00 2001 From: ZHANGWENTAI <2092913428@qq.com> Date: Tue, 22 Mar 2022 22:37:17 +0800 Subject: [PATCH 1/3] update Termination trait docs --- library/std/src/process.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/std/src/process.rs b/library/std/src/process.rs index d88ab6253712a..498be0aa262f7 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -2030,6 +2030,10 @@ 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. +/// +/// For the reason that different runtimes have diffrent specificatons on the +/// return value of the `main` function, this trait is likely to be available +/// only on standard library's runtime for type convenience. #[cfg_attr(not(test), lang = "termination")] #[unstable(feature = "termination_trait_lib", issue = "43301")] #[rustc_on_unimplemented( From 161b01a9acdfb0ccc5ec59f28996944780a6bbd4 Mon Sep 17 00:00:00 2001 From: ZHANGWENTAI <2092913428@qq.com> Date: Tue, 22 Mar 2022 23:10:00 +0800 Subject: [PATCH 2/3] fix the lint problem Signed-off-by: ZHANGWENTAI <2092913428@qq.com> --- library/std/src/process.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/process.rs b/library/std/src/process.rs index 498be0aa262f7..9d2e844187e35 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -2032,7 +2032,7 @@ pub fn id() -> u32 { /// a successful execution. In case of a failure, `libc::EXIT_FAILURE` is returned. /// /// For the reason that different runtimes have diffrent specificatons on the -/// return value of the `main` function, this trait is likely to be available +/// return value of the `main` function, this trait is likely to be available /// only on standard library's runtime for type convenience. #[cfg_attr(not(test), lang = "termination")] #[unstable(feature = "termination_trait_lib", issue = "43301")] From 71e34231e089b19c6066efba3744673208ab4ffd Mon Sep 17 00:00:00 2001 From: ZHANGWENTAI <2092913428@qq.com> Date: Tue, 22 Mar 2022 23:33:08 +0800 Subject: [PATCH 3/3] add some fix Signed-off-by: ZHANGWENTAI <2092913428@qq.com> --- library/std/src/process.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/std/src/process.rs b/library/std/src/process.rs index 9d2e844187e35..9824cce6c721e 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -2031,9 +2031,10 @@ 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. /// -/// For the reason that different runtimes have diffrent specificatons on the -/// return value of the `main` function, this trait is likely to be available -/// only on standard library's runtime for type convenience. +/// Because different runtimes have different specifications on the return value +/// of the `main` function, this trait is likely to be available only on +/// standard library's runtime for convenience. Other runtimes are not required +/// to provide similar functionality. #[cfg_attr(not(test), lang = "termination")] #[unstable(feature = "termination_trait_lib", issue = "43301")] #[rustc_on_unimplemented(