mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Move async/await tests to test/ui/async-await
This commit is contained in:
parent
fc45382c12
commit
59762baf8a
@ -1,3 +1,5 @@
|
|||||||
|
// run-pass
|
||||||
|
|
||||||
// edition:2018
|
// edition:2018
|
||||||
// aux-build:arc_wake.rs
|
// aux-build:arc_wake.rs
|
||||||
|
|
@ -1,3 +1,5 @@
|
|||||||
|
// run-pass
|
||||||
|
|
||||||
// edition:2018
|
// edition:2018
|
||||||
// aux-build:arc_wake.rs
|
// aux-build:arc_wake.rs
|
||||||
|
|
@ -1,7 +1,9 @@
|
|||||||
#![feature(async_await)]
|
// run-pass
|
||||||
#![allow(unused_parens)]
|
|
||||||
|
|
||||||
// edition:2018
|
// edition:2018
|
||||||
// pp-exact
|
// pp-exact
|
||||||
|
|
||||||
|
#![feature(async_await)]
|
||||||
|
#![allow(unused_parens)]
|
||||||
|
|
||||||
fn main() { let _a = (async { }); }
|
fn main() { let _a = (async { }); }
|
@ -1,3 +1,5 @@
|
|||||||
|
// run-pass
|
||||||
|
|
||||||
// compile-flags: --edition=2018
|
// compile-flags: --edition=2018
|
||||||
|
|
||||||
#![feature(async_await, await_macro)]
|
#![feature(async_await, await_macro)]
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user