summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/async_closure.rs
blob: 9364e7dcc67da7dd36abb5f38840951c435104b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// rustfmt-edition: 2018

fn main() {
    let async_closure = async {
        let x = 3;
        x
    };

    let f = async /* comment */ {
        let x = 3;
        x
    };

    let g = async /* comment */ move {
        let x = 3;
        x
    };

    let f = |x| async {
        println!("hello, world");
    };
}