/// code.exit_process()
/// }
/// ```
- #[unstable(feature = "exitcode_exit_method", issue = "none")]
+ #[unstable(feature = "exitcode_exit_method", issue = "97100")]
pub fn exit_process(self) -> ! {
exit(self.to_i32())
}
/// A trait for implementing arbitrary return types in the `main` function.
///
-/// The C-main function only supports to return integers as return type.
+/// The C-main function only supports returning integers.
/// So, every type implementing the `Termination` trait has to be converted
/// to an integer.
///
impl Termination for () {
#[inline]
fn report(self) -> ExitCode {
- ExitCode::SUCCESS.report()
+ ExitCode::SUCCESS
}
}
fn report(self) -> ExitCode {
let Err(err) = self;
eprintln!("Error: {err:?}");
- ExitCode::FAILURE.report()
+ ExitCode::FAILURE
}
}