review comment: move test

This commit is contained in:
Esteban Küber 2019-08-13 11:27:00 -07:00
parent 13fd4666b0
commit 25d507f497
2 changed files with 4 additions and 3 deletions

View file

@ -4,8 +4,9 @@
async fn do_the_thing() -> u8 {
8
}
fn main() {
// #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
}

View file

@ -1,5 +1,5 @@
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-63398.rs:10:13
--> $DIR/non-async-enclosing-span.rs:10:13
|
LL | fn main() {
| ---- this is not `async`