]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error: lifetime may not live long enough |
2 | --> $DIR/project-fn-ret-contravariant.rs:45:4 | |
3 | | | |
4 | LL | fn transmute<'a,'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) { | |
5 | | -- -- lifetime `'b` defined here | |
6 | | | | |
7 | | lifetime `'a` defined here | |
8 | ... | |
9 | LL | (a, b) | |
10 | | ^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` | |
60c5eb7d XL |
11 | | |
12 | = help: consider adding the following bound: `'a: 'b` | |
48663c56 XL |
13 | |
14 | error: lifetime may not live long enough | |
15 | --> $DIR/project-fn-ret-contravariant.rs:45:4 | |
16 | | | |
17 | LL | fn transmute<'a,'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) { | |
18 | | -- -- lifetime `'b` defined here | |
19 | | | | |
20 | | lifetime `'a` defined here | |
21 | ... | |
22 | LL | (a, b) | |
23 | | ^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` | |
60c5eb7d XL |
24 | | |
25 | = help: consider adding the following bound: `'b: 'a` | |
26 | ||
27 | help: `'a` and `'b` must be the same: replace one with the other | |
48663c56 XL |
28 | |
29 | error: aborting due to 2 previous errors | |
30 |