The problem is the This<'a> associated type requires T to outlive 'a, but there's no way to actually specify that in the impl. As a fix, we add 'static bounds to all generic params.
AFAICT this isn't truly fixable unless Rust adds higher-kinded polymorphism, which isn't happening any time soon. Alternatively, Rust could remove the 'static requirement from TypeId::of which would let us delete This.
This PR allows the following code to compile.
The problem is the
This<'a>
associated type requiresT
to outlive'a
, but there's no way to actually specify that in the impl. As a fix, we add'static
bounds to all generic params.AFAICT this isn't truly fixable unless Rust adds higher-kinded polymorphism, which isn't happening any time soon. Alternatively, Rust could remove the
'static
requirement fromTypeId::of
which would let us deleteThis
.