]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/process-termination.rs
Rollup merge of #106618 - jmillikin:os-net-rustdoc-wasm32, r=JohnTitor
[rust.git] / tests / rustdoc / process-termination.rs
1 // compile-flags:--test
2
3 /// A check of using various process termination strategies
4 ///
5 /// # Examples
6 ///
7 /// ```rust
8 /// assert!(true); // this returns `()`, all is well
9 /// ```
10 ///
11 /// You can also simply return `Ok(())`, but you'll need to disambiguate the
12 /// type using turbofish, because we cannot infer the type:
13 ///
14 /// ```rust
15 /// Ok::<(), &'static str>(())
16 /// ```
17 ///
18 /// You can err with anything that implements `Debug`:
19 ///
20 /// ```rust,should_panic
21 /// Err("This is returned from `main`, leading to panic")?;
22 /// Ok::<(), &'static str>(())
23 /// ```
24 pub fn check_process_termination() {}