mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 04:39:16 +00:00
36 lines
447 B
Rust
36 lines
447 B
Rust
// rustfmt-edition: 2018
|
|
|
|
fn main() {
|
|
let x = async {
|
|
Ok(())
|
|
};
|
|
}
|
|
|
|
fn baz() {
|
|
// test
|
|
let x = async {
|
|
// async blocks are great
|
|
Ok(())
|
|
};
|
|
|
|
let y = async {
|
|
Ok(())
|
|
}; // comment
|
|
|
|
spawn(
|
|
a,
|
|
async move {
|
|
action();
|
|
Ok(())
|
|
},
|
|
);
|
|
|
|
spawn(
|
|
a,
|
|
async move || {
|
|
action();
|
|
Ok(())
|
|
},
|
|
);
|
|
}
|