//@ build-pass enum Foo { Var(T), } // `T` is covariant. fn foo<'b>(x: Foo fn(&'a ())>) { let Foo::Var(x): Foo = x; } fn foo_nested<'b>(x: Foo fn(&'a ())>>) { let Foo::Var(Foo::Var(x)): Foo> = x; } fn main() {}