summary refs log tree commit diff
path: root/src/test/ui/issues/issue-51719.rs
blob: 5966edd0bf09856643ee0d12b73aa2c2104a9b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// edition:2018
//
// Tests that the .await syntax can't be used to make a generator

#![feature(async_await)]

async fn foo() {}

fn make_generator() {
    let _gen = || foo.await; //~ ERROR `await` is only allowed inside `async` functions and blocks
}

fn main() {}