Sign in
android
/
toolchain
/
rustc
/
5139364148b53d79de1b5e778004d41a6a33a4a2
/
.
/
tests
/
ui
/
async-await
/
issues
/
issue-51719.rs
blob: 1cf388cd8ab6f354011113a14226fb5f4b9ae1bc [
file
] [
log
] [
blame
]
// edition:2018
//
// Tests that the .await syntax can't be used to make a coroutine
async
fn
foo
()
{}
fn
make_coroutine
()
{
let
_gen
=
||
foo
().
await
;
//~^ ERROR `await` is only allowed inside `async` functions and blocks
}
fn
main
()
{}