]> git.proxmox.com Git - rustc.git/blame - src/test/ui/variance/variance-covariant-arg-object.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / variance / variance-covariant-arg-object.stderr
CommitLineData
b7449926 1error[E0308]: mismatched types
0731742a 2 --> $DIR/variance-covariant-arg-object.rs:15:5
b7449926 3 |
532ac7d7 4LL | v
b7449926
XL
5 | ^ lifetime mismatch
6 |
60c5eb7d
XL
7 = note: expected trait object `dyn Get<&'min i32>`
8 found trait object `dyn Get<&'max i32>`
e74abb32 9note: the lifetime `'min` as defined on the function body at 10:21...
0731742a 10 --> $DIR/variance-covariant-arg-object.rs:10:21
b7449926 11 |
dc9dc135 12LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
b7449926 13 | ^^^^
e74abb32 14note: ...does not necessarily outlive the lifetime `'max` as defined on the function body at 10:27
0731742a 15 --> $DIR/variance-covariant-arg-object.rs:10:27
b7449926 16 |
dc9dc135 17LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
b7449926
XL
18 | ^^^^
19
20error[E0308]: mismatched types
0731742a 21 --> $DIR/variance-covariant-arg-object.rs:22:5
b7449926 22 |
532ac7d7 23LL | v
b7449926
XL
24 | ^ lifetime mismatch
25 |
60c5eb7d
XL
26 = note: expected trait object `dyn Get<&'max i32>`
27 found trait object `dyn Get<&'min i32>`
e74abb32 28note: the lifetime `'min` as defined on the function body at 18:21...
0731742a 29 --> $DIR/variance-covariant-arg-object.rs:18:21
b7449926 30 |
dc9dc135 31LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
b7449926 32 | ^^^^
e74abb32 33note: ...does not necessarily outlive the lifetime `'max` as defined on the function body at 18:27
0731742a 34 --> $DIR/variance-covariant-arg-object.rs:18:27
b7449926 35 |
dc9dc135 36LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
b7449926
XL
37 | ^^^^
38
39error: aborting due to 2 previous errors
40
41For more information about this error, try `rustc --explain E0308`.