Hi there,
I‘ve had a related question some days back and the answer there might shed a light on your question as well:
https://users.rust-lang.org/t/using-typeid-as-key-in-btreemap-lifetime-question-for-typeid-t/36548/4
In a nut shell: if you add the 'static lifetime as a bound to your generic the compiler will be fine.
pub struct Generic<T:’static>(T);