]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/async_closure.rs
Add 'src/tools/rustfmt/' from commit '7872306edf2e11a69aaffb9434088fd66b46a863'
[rust.git] / src / tools / rustfmt / tests / target / async_closure.rs
1 // rustfmt-edition: 2018
2
3 fn main() {
4     let async_closure = async {
5         let x = 3;
6         x
7     };
8
9     let f = async /* comment */ {
10         let x = 3;
11         x
12     };
13
14     let g = async /* comment */ move {
15         let x = 3;
16         x
17     };
18
19     let f = |x| async {
20         println!("hello, world");
21     };
22 }