]> git.proxmox.com Git - rustc.git/blame - src/test/ui/object-lifetime/object-lifetime-default-elision.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / object-lifetime / object-lifetime-default-elision.stderr
CommitLineData
b7449926 1error[E0495]: cannot infer an appropriate lifetime for automatic coercion due to conflicting requirements
0731742a 2 --> $DIR/object-lifetime-default-elision.rs:71:5
b7449926
XL
3 |
4LL | ss
5 | ^^
6 |
c295e0f8 7note: first, the lifetime cannot outlive the lifetime `'a` as defined here...
0731742a 8 --> $DIR/object-lifetime-default-elision.rs:54:10
b7449926 9 |
dc9dc135 10LL | fn load3<'a,'b>(ss: &'a dyn SomeTrait) -> &'b dyn SomeTrait {
b7449926 11 | ^^
0bf4aa26 12note: ...so that reference does not outlive borrowed content
0731742a 13 --> $DIR/object-lifetime-default-elision.rs:71:5
b7449926
XL
14 |
15LL | ss
16 | ^^
c295e0f8 17note: but, the lifetime must be valid for the lifetime `'b` as defined here...
0731742a 18 --> $DIR/object-lifetime-default-elision.rs:54:13
b7449926 19 |
dc9dc135 20LL | fn load3<'a,'b>(ss: &'a dyn SomeTrait) -> &'b dyn SomeTrait {
b7449926 21 | ^^
c295e0f8 22note: ...so that the types are compatible
60c5eb7d
XL
23 --> $DIR/object-lifetime-default-elision.rs:71:5
24 |
25LL | ss
26 | ^^
f9f354fc
XL
27 = note: expected `&'b (dyn SomeTrait + 'b)`
28 found `&dyn SomeTrait`
b7449926
XL
29
30error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
0731742a 31 --> $DIR/object-lifetime-default-elision.rs:71:5
b7449926
XL
32 |
33LL | ss
34 | ^^
35 |
c295e0f8 36note: first, the lifetime cannot outlive the lifetime `'a` as defined here...
0731742a 37 --> $DIR/object-lifetime-default-elision.rs:54:10
b7449926 38 |
dc9dc135 39LL | fn load3<'a,'b>(ss: &'a dyn SomeTrait) -> &'b dyn SomeTrait {
b7449926
XL
40 | ^^
41note: ...so that the declared lifetime parameter bounds are satisfied
0731742a 42 --> $DIR/object-lifetime-default-elision.rs:71:5
b7449926
XL
43 |
44LL | ss
45 | ^^
c295e0f8 46note: but, the lifetime must be valid for the lifetime `'b` as defined here...
0731742a 47 --> $DIR/object-lifetime-default-elision.rs:54:13
b7449926 48 |
dc9dc135 49LL | fn load3<'a,'b>(ss: &'a dyn SomeTrait) -> &'b dyn SomeTrait {
b7449926 50 | ^^
c295e0f8 51note: ...so that the types are compatible
60c5eb7d
XL
52 --> $DIR/object-lifetime-default-elision.rs:71:5
53 |
54LL | ss
55 | ^^
f9f354fc
XL
56 = note: expected `&'b (dyn SomeTrait + 'b)`
57 found `&dyn SomeTrait`
b7449926
XL
58
59error: aborting due to 2 previous errors
60
e74abb32 61For more information about this error, try `rustc --explain E0495`.