rust/src/test/ui/async-await/issues/issue-55324.rs

15 lines
237 B
Rust
Raw Normal View History

// compile-pass
// edition:2018
2019-04-05 16:14:19 -05:00
#![feature(async_await, await_macro)]
use std::future::Future;
#[allow(unused)]
async fn foo<F: Future<Output = i32>>(x: &i32, future: F) -> i32 {
let y = await!(future);
*x + y
}
fn main() {}