2019-07-04 13:20:04 -05:00
|
|
|
// edition:2018
|
|
|
|
|
2019-08-01 20:45:58 -05:00
|
|
|
// Regression test for issue #62382.
|
2019-07-04 13:20:04 -05:00
|
|
|
|
|
|
|
use std::future::Future;
|
|
|
|
|
|
|
|
fn get_future() -> impl Future<Output = ()> {
|
2020-06-18 12:30:47 -05:00
|
|
|
//~^ ERROR `()` is not a future
|
2019-07-04 13:20:04 -05:00
|
|
|
panic!()
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn foo() {
|
2023-06-24 05:02:54 -05:00
|
|
|
let a; //~ ERROR type annotations needed
|
2019-07-04 13:20:04 -05:00
|
|
|
get_future().await;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|