summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/async_fn.rs
blob: c63cf5b0f51e1dc8834bdf3139802a0b37e18179 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// rustfmt-edition: 2018

async fn bar() -> Result<(), ()> {
    Ok(())
}

pub async fn baz() -> Result<(), ()> {
    Ok(())
}

async unsafe fn foo() {
    async move {
        Ok(())
    }
}

async unsafe fn rust() {
    async move { // comment
        Ok(())
    }
}

async fn await_try() {
    something
     .await
      ?
     ;
}