]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/async_fn.rs
Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup
[rust.git] / src / tools / rustfmt / tests / target / 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 { Ok(()) }
13 }
14
15 async unsafe fn rust() {
16     async move {
17         // comment
18         Ok(())
19     }
20 }
21
22 async fn await_try() {
23     something.await?;
24 }