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