blob: 3283ae67e5143460e9894f12355feb871fe32ac7 [file] [log] [blame]
error[E0308]: mismatched types
--> $DIR/variance-invariant-arg-object.rs:21:5
|
LL | v //~ ERROR mismatched types
| ^ lifetime mismatch
|
= note: expected type `dyn Get<&'min i32>`
found type `dyn Get<&'max i32>`
note: the lifetime 'min as defined on the function body at 17:21...
--> $DIR/variance-invariant-arg-object.rs:17:21
|
LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
| ^^^^
note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 17:27
--> $DIR/variance-invariant-arg-object.rs:17:27
|
LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
| ^^^^
error[E0308]: mismatched types
--> $DIR/variance-invariant-arg-object.rs:28:5
|
LL | v //~ ERROR mismatched types
| ^ lifetime mismatch
|
= note: expected type `dyn Get<&'max i32>`
found type `dyn Get<&'min i32>`
note: the lifetime 'min as defined on the function body at 24:21...
--> $DIR/variance-invariant-arg-object.rs:24:21
|
LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
| ^^^^
note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 24:27
--> $DIR/variance-invariant-arg-object.rs:24:27
|
LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
| ^^^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.