mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
16 lines
323 B
Rust
16 lines
323 B
Rust
|
#![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);
|
||
|
}
|