]> git.proxmox.com Git - rustc.git/blame - src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / associated-types / cache / project-fn-ret-contravariant.krisskross.nll.stderr
CommitLineData
48663c56
XL
1error: lifetime may not live long enough
2 --> $DIR/project-fn-ret-contravariant.rs:45:4
3 |
4LL | 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...
9LL | (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
14error: lifetime may not live long enough
15 --> $DIR/project-fn-ret-contravariant.rs:45:4
16 |
17LL | 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...
22LL | (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
27help: `'a` and `'b` must be the same: replace one with the other
48663c56
XL
28
29error: aborting due to 2 previous errors
30