Can I force a trait to be covariant?
问题 Thanks to @francis-gagné 's excellent answer to another question, I have a clearer view of how variance works. For example, a type containing a reference is covariant over its lifetime parameter, as demonstrated below. struct Foo<'a> (PhantomData<&'a str>); /// Foo is covariant over its lifetime parameter pub fn test_foo<'a:'b, 'b:'c, 'c>() { let fa: Foo<'a> = Foo(PhantomData); let fb: Foo<'b> = Foo(PhantomData); let fc: Foo<'c> = Foo(PhantomData); let v: Vec<Foo<'b>> = vec![fa, fb]; // fc is