3 // Test that a type which is covariant with respect to its region
4 // parameter is successful when used in a covariant way.
6 // Note: see ui/variance/variance-regions-*.rs for the tests that
7 // check that the variance inference works in the first place.
9 // This is covariant with respect to 'a, meaning that
10 // Covariant<'foo> <: Covariant<'static> because
12 // pretty-expanded FIXME #23616
14 struct Covariant<'a> {
15 f: extern "Rust" fn(&'a isize)
18 fn use_<'a>(c: Covariant<'a>) {
19 // OK Because Covariant<'a> <: Covariant<'static> iff 'a <= 'static
20 let _: Covariant<'static> = c;