//~^ ERROR lifetime may not live long enough
}
-fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
- -> Box<dyn Get<&'max i32>>
+fn get_max_from_min<'min, 'max>(v: Box<dyn Get<&'min i32>>)
+ -> Box<dyn Get<&'max i32>>
where 'max : 'min
{
// Previously OK:
error: lifetime may not live long enough
--> $DIR/variance-contravariant-arg-object.rs:23:5
|
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max>(v: Box<dyn Get<&'min i32>>)
| ---- ---- lifetime `'max` defined here
| |
| lifetime `'min` defined here
//~^ ERROR lifetime may not live long enough
}
-fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
- -> Box<dyn Get<&'max i32>>
+fn get_max_from_min<'min, 'max>(v: Box<dyn Get<&'min i32>>)
+ -> Box<dyn Get<&'max i32>>
where 'max : 'min
{
v
error: lifetime may not live long enough
--> $DIR/variance-covariant-arg-object.rs:23:5
|
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max>(v: Box<dyn Get<&'min i32>>)
| ---- ---- lifetime `'max` defined here
| |
| lifetime `'min` defined here
//~^ ERROR lifetime may not live long enough
}
-fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
- -> Box<dyn Get<&'max i32>>
+fn get_max_from_min<'min, 'max>(v: Box<dyn Get<&'min i32>>)
+ -> Box<dyn Get<&'max i32>>
where 'max : 'min
{
v
error: lifetime may not live long enough
--> $DIR/variance-invariant-arg-object.rs:19:5
|
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max>(v: Box<dyn Get<&'min i32>>)
| ---- ---- lifetime `'max` defined here
| |
| lifetime `'min` defined here