]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/source/async_fn.rs
Rollup merge of #107166 - petrochenkov:nooptable, r=oli-obk
[rust.git] / src / tools / rustfmt / tests / source / async_fn.rs
1 // rustfmt-edition: 2018
2
3 async fn bar() -> Result<(), ()> {
4     Ok(())
5 }
6
7 pub async fn baz() -> Result<(), ()> {
8     Ok(())
9 }
10
11 async unsafe fn foo() {
12     async move {
13         Ok(())
14     }
15 }
16
17 async unsafe fn rust() {
18     async move { // comment
19         Ok(())
20     }
21 }
22
23 async fn await_try() {
24     something
25      .await
26       ?
27      ;
28 }