2022-10-01 12:19:31 +02:00
|
|
|
// revisions: no_drop_tracking drop_tracking drop_tracking_mir
|
|
|
|
// [drop_tracking] compile-flags: -Zdrop-tracking
|
|
|
|
// [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir
|
2019-07-04 14:20:04 -04:00
|
|
|
// edition:2018
|
|
|
|
|
2019-08-02 03:45:58 +02:00
|
|
|
// Regression test for issue #62382.
|
2019-07-04 14:20:04 -04:00
|
|
|
|
|
|
|
use std::future::Future;
|
|
|
|
|
|
|
|
fn get_future() -> impl Future<Output = ()> {
|
2020-06-18 10:30:47 -07:00
|
|
|
//~^ ERROR `()` is not a future
|
2019-07-04 14:20:04 -04:00
|
|
|
panic!()
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn foo() {
|
2023-01-26 03:51:26 +00:00
|
|
|
let a;
|
|
|
|
//[no_drop_tracking,drop_tracking]~^ ERROR type inside `async fn` body must be known in this context
|
|
|
|
//[drop_tracking_mir]~^^ ERROR type annotations needed
|
2019-07-04 14:20:04 -04:00
|
|
|
get_future().await;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|