]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/async_fn.rs
Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31
[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 }