blob: 37fdea960be7ca2703c7680397537a65fae83ed2 [file] [log] [blame]
error: lifetime may not live long enough
--> $DIR/variance-covariant-arg-object.rs:15:5
|
LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
| ---- ---- lifetime `'max` defined here
| |
| lifetime `'min` defined here
...
LL | v
| ^ returning this value requires that `'min` must outlive `'max`
|
= help: consider adding the following bound: `'min: 'max`
error: lifetime may not live long enough
--> $DIR/variance-covariant-arg-object.rs:22:5
|
LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
| ---- ---- lifetime `'max` defined here
| |
| lifetime `'min` defined here
...
LL | v
| ^ returning this value requires that `'min` must outlive `'max`
|
= help: consider adding the following bound: `'min: 'max`
error: aborting due to 2 previous errors