Move async/await tests to test/ui/async-await

This commit is contained in:
varkor 2019-05-24 21:49:34 +01:00
parent fc45382c12
commit 59762baf8a
44 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,5 @@
// run-pass
// edition:2018
// aux-build:arc_wake.rs

View File

@ -1,3 +1,5 @@
// run-pass
// edition:2018
// aux-build:arc_wake.rs

View File

@ -1,7 +1,9 @@
#![feature(async_await)]
#![allow(unused_parens)]
// run-pass
// edition:2018
// pp-exact
#![feature(async_await)]
#![allow(unused_parens)]
fn main() { let _a = (async { }); }

View File

@ -1,3 +1,5 @@
// run-pass
// compile-flags: --edition=2018
#![feature(async_await, await_macro)]

View File

@ -0,0 +1,10 @@
error[E0708]: `async` non-`move` closures with arguments are not currently supported
--> $DIR/no-args-non-move-async-closure.rs:6:13
|
LL | let _ = async |x: u8| {};
| ^^^^^^^^^^^^^
|
= help: consider using `let` statements to manually capture variables by reference before entering an `async move` closure
error: aborting due to previous error