2018-08-31 00:04:23 -07:00
|
|
|
// rustfmt-edition: 2018
|
2018-07-09 23:20:30 +09:00
|
|
|
|
|
|
|
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
|
|
|
|
};
|
2019-12-03 08:47:50 +09:00
|
|
|
|
|
|
|
let f = |x| async {
|
|
|
|
println!("hello, world");
|
|
|
|
};
|
2018-07-09 23:20:30 +09:00
|
|
|
}
|