]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/unresolved_type_param.rs
Rollup merge of #60897 - seanmonstar:patch-4, r=sfackler
[rust.git] / src / test / ui / async-await / unresolved_type_param.rs
1 // Provoke an unresolved type error (T).
2 // Error message should pinpoint the type parameter T as needing to be bound
3 // (rather than give a general error message)
4 // edition:2018
5 #![feature(async_await)]
6 async fn bar<T>() -> () {}
7
8 async fn foo() {
9     bar().await;
10     //~^ ERROR type inside generator must be known in this context
11     //~| NOTE cannot infer type for `T`
12     //~| NOTE the type is part of the generator because of this `yield`
13     //~| NOTE in this expansion of desugaring of `await`
14 }
15 fn main() {}