]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements |
04454e1e | 2 | --> $DIR/region-object-lifetime-2.rs:14:7 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | x.borrowed() |
b7449926 XL |
5 | | ^^^^^^^^ |
6 | | | |
c295e0f8 | 7 | note: first, the lifetime cannot outlive the lifetime `'a` as defined here... |
04454e1e | 8 | --> $DIR/region-object-lifetime-2.rs:13:42 |
b7449926 | 9 | | |
dc9dc135 | 10 | LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a dyn Foo) -> &'b () { |
b7449926 | 11 | | ^^ |
0bf4aa26 | 12 | note: ...so that reference does not outlive borrowed content |
04454e1e | 13 | --> $DIR/region-object-lifetime-2.rs:14:5 |
b7449926 | 14 | | |
532ac7d7 | 15 | LL | x.borrowed() |
b7449926 | 16 | | ^ |
c295e0f8 | 17 | note: but, the lifetime must be valid for the lifetime `'b` as defined here... |
04454e1e | 18 | --> $DIR/region-object-lifetime-2.rs:13:45 |
b7449926 | 19 | | |
dc9dc135 | 20 | LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a dyn Foo) -> &'b () { |
b7449926 XL |
21 | | ^^ |
22 | note: ...so that reference does not outlive borrowed content | |
04454e1e | 23 | --> $DIR/region-object-lifetime-2.rs:14:5 |
b7449926 | 24 | | |
532ac7d7 | 25 | LL | x.borrowed() |
b7449926 XL |
26 | | ^^^^^^^^^^^^ |
27 | ||
28 | error: aborting due to previous error | |
29 | ||
e74abb32 | 30 | For more information about this error, try `rustc --explain E0495`. |