Files
rust/src/test/ui/variance/variance-covariant-arg-object.stderr

42 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0308]: mismatched types
2018-12-25 08:56:47 -07:00
--> $DIR/variance-covariant-arg-object.rs:15:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | v
2018-08-08 14:28:26 +02:00
| ^ lifetime mismatch
|
2019-11-14 14:08:08 -08:00
= note: expected trait object `dyn Get<&'min i32>`
found trait object `dyn Get<&'max i32>`
2019-10-11 08:58:35 +09:00
note: the lifetime `'min` as defined on the function body at 10:21...
2018-12-25 08:56:47 -07:00
--> $DIR/variance-covariant-arg-object.rs:10:21
2018-08-08 14:28:26 +02:00
|
2019-05-28 14:46:13 -04:00
LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
2018-08-08 14:28:26 +02:00
| ^^^^
2019-10-11 08:58:35 +09:00
note: ...does not necessarily outlive the lifetime `'max` as defined on the function body at 10:27
2018-12-25 08:56:47 -07:00
--> $DIR/variance-covariant-arg-object.rs:10:27
2018-08-08 14:28:26 +02:00
|
2019-05-28 14:46:13 -04:00
LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
2018-08-08 14:28:26 +02:00
| ^^^^
error[E0308]: mismatched types
2018-12-25 08:56:47 -07:00
--> $DIR/variance-covariant-arg-object.rs:22:5
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | v
2018-08-08 14:28:26 +02:00
| ^ lifetime mismatch
|
2019-11-14 14:08:08 -08:00
= note: expected trait object `dyn Get<&'max i32>`
found trait object `dyn Get<&'min i32>`
2019-10-11 08:58:35 +09:00
note: the lifetime `'min` as defined on the function body at 18:21...
2018-12-25 08:56:47 -07:00
--> $DIR/variance-covariant-arg-object.rs:18:21
2018-08-08 14:28:26 +02:00
|
2019-05-28 14:46:13 -04:00
LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
2018-08-08 14:28:26 +02:00
| ^^^^
2019-10-11 08:58:35 +09:00
note: ...does not necessarily outlive the lifetime `'max` as defined on the function body at 18:27
2018-12-25 08:56:47 -07:00
--> $DIR/variance-covariant-arg-object.rs:18:27
2018-08-08 14:28:26 +02:00
|
2019-05-28 14:46:13 -04:00
LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
2018-08-08 14:28:26 +02:00
| ^^^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.