blob: f0fd7b26e4e4913d00baafafcacbf89a743e4a12 [file] [log] [blame] [edit]
// 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 lifetime may not live long enough
}
fn main() { }