Open
Description
Basically, this should compile:
trait Trait<'foo> { type Assoc: 'static; }
fn test<'foo, T: Trait<'foo>>(x: T::Assoc) -> impl FnOnce() {
move || { let _x = x; }
}
Thanks to @eddyb I can work around this, writing
trait Trait<'foo> { type Assoc: 'static; }
fn test<'foo, A: 'static, T: Trait<'foo, Assoc=A>>(x: T::Assoc) -> impl FnOnce() {
move || { let _x = x; }
}
but that is almost impossible to discover.