rust/src/test/ui/unboxed-closures/issue-53448.rs

16 lines
323 B
Rust
Raw Normal View History

2020-10-09 09:32:13 +00:00
#![feature(unboxed_closures)]
trait Lt<'a> {
type T;
}
impl<'a> Lt<'a> for () {
type T = ();
}
fn main() {
let v: <() as Lt<'_>>::T = ();
let f: &mut dyn FnMut<(_,), Output = ()> = &mut |_: <() as Lt<'_>>::T| {};
//~^ ERROR: the size for values of type `<() as Lt<'_>>::T` cannot be known
f(v);
}