summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/awaiting-unsized-param.rs
blob: e8b18bf37f86626b542ed65ae597cf30474e8c51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// edition: 2021

#![feature(unsized_fn_params, unsized_locals)]
//~^ WARN the feature `unsized_locals` is incomplete

use std::future::Future;

async fn bug<T>(mut f: dyn Future<Output = T> + Unpin) -> T {
    //~^ ERROR the size for values of type `(dyn Future<Output = T> + Unpin + 'static)` cannot be known at compilation time
    (&mut f).await
}

fn main() {}