1 // Test various uses of structs with distint variances to make sure
2 // they permit lifetimes to be approximated as expected.
6 struct SomeStruct<T>(*mut T);
8 fn foo<'min,'max>(v: SomeStruct<&'max ()>)
9 -> SomeStruct<&'min ()>
12 v //~ ERROR mismatched types
15 fn bar<'min,'max>(v: SomeStruct<&'min ()>)
16 -> SomeStruct<&'max ()>
19 v //~ ERROR mismatched types