1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// check-pass #![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| {}; f(v); }