rust/tests/ui/traits/alias/dont-elaborate-non-self.rs

11 lines
252 B
Rust
Raw Normal View History

2023-01-31 15:22:11 -06:00
#![feature(trait_alias)]
use std::future::Future;
trait F<Fut: Future<Output = usize>> = Fn() -> Fut;
fn f<Fut>(a: dyn F<Fut>) {}
//~^ ERROR the size for values of type `(dyn Fn() -> Fut + 'static)` cannot be known at compilation time
fn main() {}