blob: 947abe24b5569a196300f6c510a4cac59818df6e [file] [log] [blame]
error[E0308]: mismatched types
--> $DIR/variance-use-covariant-struct-1.rs:20:5
|
LL | v //~ ERROR mismatched types
| ^ lifetime mismatch
|
= note: expected type `SomeStruct<&'max ()>`
found type `SomeStruct<&'min ()>`
note: the lifetime 'min as defined on the function body at 16:8...
--> $DIR/variance-use-covariant-struct-1.rs:16:8
|
LL | fn foo<'min,'max>(v: SomeStruct<&'min ()>)
| ^^^^
note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 16:13
--> $DIR/variance-use-covariant-struct-1.rs:16:13
|
LL | fn foo<'min,'max>(v: SomeStruct<&'min ()>)
| ^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.