1 // Test various uses of structs with distinct variances to make sure
2 // they permit lifetimes to be approximated as expected.
4 struct SomeStruct<T>(*mut T);
6 fn foo<'min,'max>(v: SomeStruct<&'max ()>)
7 -> SomeStruct<&'min ()>
11 //~^ ERROR lifetime may not live long enough
14 fn bar<'min,'max>(v: SomeStruct<&'min ()>)
15 -> SomeStruct<&'max ()>
19 //~^ ERROR lifetime may not live long enough