]> git.lizzy.rs Git - rust.git/blob - tests/target/async_block.rs
Fix static async closure qualifier order
[rust.git] / tests / target / async_block.rs
1 // rustfmt-edition: 2018
2
3 fn main() {
4     let x = async { Ok(()) };
5 }
6
7 fn baz() {
8     // test
9     let x = async {
10         // async blocks are great
11         Ok(())
12     };
13
14     let y = async { Ok(()) }; // comment
15
16     spawn(a, async move {
17         action();
18         Ok(())
19     });
20
21     spawn(a, async move || {
22         action();
23         Ok(())
24     });
25
26     spawn(a, static async || {
27         action();
28         Ok(())
29     });
30
31     spawn(a, static async move || {
32         action();
33         Ok(())
34     });
35 }