mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 09:36:06 +00:00
12 lines
357 B
Rust
12 lines
357 B
Rust
// edition:2018
|
|
|
|
async fn do_the_thing() -> u8 {
|
|
8
|
|
}
|
|
// #63398: point at the enclosing scope and not the previously seen closure
|
|
fn main() { //~ NOTE this is not `async`
|
|
let x = move || {};
|
|
let y = do_the_thing().await; //~ ERROR `await` is only allowed inside `async` functions
|
|
//~^ NOTE only allowed inside `async` functions and blocks
|
|
}
|