mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Rollup merge of #38151 - GuillaumeGomez:exit-examples, r=frewsxcv
Add examples for exit function r? @frewsxcv
This commit is contained in:
commit
99d9be903c
@ -827,6 +827,14 @@ impl Child {
|
||||
/// will be run. If a clean shutdown is needed it is recommended to only call
|
||||
/// this function at a known point where there are no more destructors left
|
||||
/// to run.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::process;
|
||||
///
|
||||
/// process::exit(0);
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub fn exit(code: i32) -> ! {
|
||||
::sys_common::cleanup();
|
||||
|
Loading…
Reference in New Issue
Block a user