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