Files
rust/tests/ui/async-await/awaiting-unsized-param.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
286 B
Rust
Raw Permalink Normal View History

//@ edition: 2021
2025-06-13 01:16:36 +02:00
#![feature(unsized_fn_params)]
use std::future::Future;
async fn bug<T>(mut f: dyn Future<Output = T> + Unpin) -> T {
2025-06-13 01:16:36 +02:00
//~^ ERROR the size for values of type `dyn Future<Output = T> + Unpin` cannot be known at compilation time
(&mut f).await
}
fn main() {}