Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
async-await
/
issues
/
issue-51719.rs
blob: dd47dad453342232e11e82a1d3d354bf98f5e8ef [
file
] [
log
] [
blame
] [
edit
]
//@ 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
()
{}