2024-02-16 20:02:50 +00:00
|
|
|
//@ edition: 2021
|
2023-09-23 04:03:24 +00:00
|
|
|
|
2025-06-13 01:16:36 +02:00
|
|
|
#![feature(unsized_fn_params)]
|
2023-09-23 04:03:24 +00:00
|
|
|
|
|
|
|
|
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
|
2023-09-23 04:03:24 +00:00
|
|
|
(&mut f).await
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|