diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-12-07 10:42:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-07 10:42:51 -0800 |
| commit | 99d9be903caa8b9e308c17b8bef0063f60ba2e19 (patch) | |
| tree | d5ee7308f600703dd9a0ff549faa8044edb2be2c /src | |
| parent | ff8faedf0c9a5b59ec8f9f4fbdb9ff22de153ee5 (diff) | |
| parent | f90986e3a8d21d979e871c1af304ccfbe2c81093 (diff) | |
| download | rust-99d9be903caa8b9e308c17b8bef0063f60ba2e19.tar.gz rust-99d9be903caa8b9e308c17b8bef0063f60ba2e19.zip | |
Rollup merge of #38151 - GuillaumeGomez:exit-examples, r=frewsxcv
Add examples for exit function r? @frewsxcv
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/process.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs index bfc36d5b21f..858537dd2de 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -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(); |
