]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.stderr
Rollup merge of #105567 - TimNN:kcfi16, r=nikic
[rust.git] / src / test / ui / associated-types / cache / project-fn-ret-contravariant.krisskross.stderr
1 error: lifetime may not live long enough
2   --> $DIR/project-fn-ret-contravariant.rs:46: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`
11    |
12    = help: consider adding the following bound: `'a: 'b`
13
14 error: lifetime may not live long enough
15   --> $DIR/project-fn-ret-contravariant.rs:46: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`
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
28
29 error: aborting due to 2 previous errors
30