]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-51719.rs
b2dbadebc7c1e48ff9c1b2aee7b7648fc98c4ae7
[rust.git] / src / test / ui / issues / issue-51719.rs
1 // edition:2018
2 //
3 // Tests that the .await syntax can't be used to make a generator
4
5 #![feature(async_await)]
6
7 async fn foo() {}
8
9 fn make_generator() {
10     let _gen = || foo.await; //~ ERROR `await` is only allowed inside `async` functions and blocks
11 }
12
13 fn main() {}