blob: 7c433378df5c3abd1b72b9cdba6f7c0702c4b6ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
error[E0308]: mismatched types
--> $DIR/variance-use-contravariant-struct-1.rs:12:5
|
LL | v
| ^ lifetime mismatch
|
= note: expected type `SomeStruct<&'min ()>`
found type `SomeStruct<&'max ()>`
note: the lifetime 'min as defined on the function body at 8:8...
--> $DIR/variance-use-contravariant-struct-1.rs:8:8
|
LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
| ^^^^
note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 8:13
--> $DIR/variance-use-contravariant-struct-1.rs:8: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`.
|