]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/outlives-suggestion-more.stderr
Rollup merge of #105216 - GuillaumeGomez:rm-unused-gui-test, r=notriddle
[rust.git] / src / test / ui / nll / outlives-suggestion-more.stderr
1 error: lifetime may not live long enough
2   --> $DIR/outlives-suggestion-more.rs:5:5
3    |
4 LL | fn foo1<'a, 'b, 'c, 'd>(x: &'a usize, y: &'b usize) -> (&'c usize, &'d usize) {
5    |         --      -- lifetime `'c` defined here
6    |         |
7    |         lifetime `'a` defined here
8 LL |     (x, y)
9    |     ^^^^^^ function was supposed to return data with lifetime `'c` but it is returning data with lifetime `'a`
10    |
11    = help: consider adding the following bound: `'a: 'c`
12
13 error: lifetime may not live long enough
14   --> $DIR/outlives-suggestion-more.rs:5:5
15    |
16 LL | fn foo1<'a, 'b, 'c, 'd>(x: &'a usize, y: &'b usize) -> (&'c usize, &'d usize) {
17    |             --      -- lifetime `'d` defined here
18    |             |
19    |             lifetime `'b` defined here
20 LL |     (x, y)
21    |     ^^^^^^ function was supposed to return data with lifetime `'d` but it is returning data with lifetime `'b`
22    |
23    = help: consider adding the following bound: `'b: 'd`
24
25 help: the following changes may resolve your lifetime errors
26    |
27    = help: add bound `'a: 'c`
28    = help: add bound `'b: 'd`
29
30 error: lifetime may not live long enough
31   --> $DIR/outlives-suggestion-more.rs:11:5
32    |
33 LL | fn foo2<'a, 'b, 'c>(x: &'a usize, y: &'b usize) -> (&'c usize, &'static usize) {
34    |         --      -- lifetime `'c` defined here
35    |         |
36    |         lifetime `'a` defined here
37 LL |     (x, y)
38    |     ^^^^^^ function was supposed to return data with lifetime `'c` but it is returning data with lifetime `'a`
39    |
40    = help: consider adding the following bound: `'a: 'c`
41
42 error: lifetime may not live long enough
43   --> $DIR/outlives-suggestion-more.rs:11:5
44    |
45 LL | fn foo2<'a, 'b, 'c>(x: &'a usize, y: &'b usize) -> (&'c usize, &'static usize) {
46    |             -- lifetime `'b` defined here
47 LL |     (x, y)
48    |     ^^^^^^ returning this value requires that `'b` must outlive `'static`
49
50 help: the following changes may resolve your lifetime errors
51    |
52    = help: add bound `'a: 'c`
53    = help: replace `'b` with `'static`
54
55 error: lifetime may not live long enough
56   --> $DIR/outlives-suggestion-more.rs:21:5
57    |
58 LL | fn foo3<'a, 'b, 'c, 'd, 'e>(
59    |         --  -- lifetime `'b` defined here
60    |         |
61    |         lifetime `'a` defined here
62 ...
63 LL |     (x, y, z)
64    |     ^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
65    |
66    = help: consider adding the following bound: `'a: 'b`
67
68 error: lifetime may not live long enough
69   --> $DIR/outlives-suggestion-more.rs:21:5
70    |
71 LL | fn foo3<'a, 'b, 'c, 'd, 'e>(
72    |         --  -- lifetime `'b` defined here
73    |         |
74    |         lifetime `'a` defined here
75 ...
76 LL |     (x, y, z)
77    |     ^^^^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
78    |
79    = help: consider adding the following bound: `'b: 'a`
80
81 error: lifetime may not live long enough
82   --> $DIR/outlives-suggestion-more.rs:21:5
83    |
84 LL | fn foo3<'a, 'b, 'c, 'd, 'e>(
85    |                 -- lifetime `'c` defined here
86 ...
87 LL |     (x, y, z)
88    |     ^^^^^^^^^ returning this value requires that `'c` must outlive `'static`
89
90 help: the following changes may resolve your lifetime errors
91    |
92    = help: `'a` and `'b` must be the same: replace one with the other
93    = help: replace `'c` with `'static`
94
95 error: aborting due to 7 previous errors
96