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