]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | error: lifetime may not live long enough |
923072b8 | 2 | --> $DIR/region-object-lifetime-2.rs:10:5 |
48663c56 | 3 | | |
dc9dc135 | 4 | LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a dyn Foo) -> &'b () { |
48663c56 XL |
5 | | -- -- lifetime `'b` defined here |
6 | | | | |
7 | | lifetime `'a` defined here | |
8 | LL | x.borrowed() | |
5099ac24 | 9 | | ^^^^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` |
60c5eb7d XL |
10 | | |
11 | = help: consider adding the following bound: `'a: 'b` | |
48663c56 | 12 | |
4b012472 | 13 | error: aborting due to 1 previous error |
48663c56 | 14 |