blob: e19a35bdfacfe7a049019db90faf08f7ca1a7484 [file] [log] [blame]
// Test that a covariant struct does not permit the lifetime of a
// reference to be enlarged.
struct SomeStruct<T>(T);
fn foo<'min,'max>(v: SomeStruct<&'min ()>)
-> SomeStruct<&'max ()>
where 'max : 'min
{
v //~ ERROR mismatched types
}
fn main() { }