2020-04-19 17:27:28 -07:00
|
|
|
//@ check-pass
|
2019-03-13 17:42:23 -07:00
|
|
|
//@ edition:2018
|
|
|
|
|
|
|
|
|
|
use std::future::Future;
|
|
|
|
|
|
|
|
|
|
async fn foo<F: Future<Output = i32>>(x: &i32, future: F) -> i32 {
|
2019-07-04 00:25:14 +02:00
|
|
|
let y = future.await;
|
2019-03-13 17:42:23 -07:00
|
|
|
*x + y
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|