mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 04:14:28 +00:00
Add a test for async closures
This commit is contained in:
parent
276a768eb2
commit
25f83b14c7
18
tests/target/async_closure.rs
Normal file
18
tests/target/async_closure.rs
Normal file
@ -0,0 +1,18 @@
|
||||
// rustfmt-edition: Edition2018
|
||||
|
||||
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
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user