]> git.proxmox.com Git - rustc.git/blob - tests/ui/async-await/issues/non-async-enclosing-span.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / async-await / issues / non-async-enclosing-span.rs
1 // edition:2018
2
3 async fn do_the_thing() -> u8 {
4 8
5 }
6 // #63398: point at the enclosing scope and not the previously seen closure
7 fn main() { //~ NOTE this is not `async`
8 let x = move || {};
9 let y = do_the_thing().await; //~ ERROR `await` is only allowed inside `async` functions
10 //~^ NOTE only allowed inside `async` functions and blocks
11 }