]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/process.rs
Rollup merge of #38151 - GuillaumeGomez:exit-examples, r=frewsxcv
[rust.git] / src / libstd / process.rs
index bfc36d5b21fe86d650683ed6c8e2c98b26783dfe..858537dd2de122cd75a9e42010be6119d40e4602 100644 (file)
@@ -827,6 +827,14 @@ pub fn wait_with_output(mut self) -> io::Result<Output> {
 /// 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();