2018-08-08 07:28:26 -05:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/variance-use-contravariant-struct-1.rs:12:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | v
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^ lifetime mismatch
|
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected struct `SomeStruct<&'min ()>`
|
|
|
|
found struct `SomeStruct<&'max ()>`
|
2019-10-10 18:58:35 -05:00
|
|
|
note: the lifetime `'min` as defined on the function body at 8:8...
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/variance-use-contravariant-struct-1.rs:8:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
|
|
|
|
| ^^^^
|
2019-10-10 18:58:35 -05:00
|
|
|
note: ...does not necessarily outlive the lifetime `'max` as defined on the function body at 8:13
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/variance-use-contravariant-struct-1.rs:8:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|