summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/outlives-suggestion-more.stderr
blob: c8c604b5b4c785247158400dee62e35ff1a1ec35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
error: lifetime may not live long enough
  --> $DIR/outlives-suggestion-more.rs:5:5
   |
LL | fn foo1<'a, 'b, 'c, 'd>(x: &'a usize, y: &'b usize) -> (&'c usize, &'d usize) {
   |         --      -- lifetime `'c` defined here
   |         |
   |         lifetime `'a` defined here
LL |     (x, y)
   |     ^^^^^^ function was supposed to return data with lifetime `'c` but it is returning data with lifetime `'a`
   |
   = help: consider adding the following bound: `'a: 'c`

error: lifetime may not live long enough
  --> $DIR/outlives-suggestion-more.rs:5:5
   |
LL | fn foo1<'a, 'b, 'c, 'd>(x: &'a usize, y: &'b usize) -> (&'c usize, &'d usize) {
   |             --      -- lifetime `'d` defined here
   |             |
   |             lifetime `'b` defined here
LL |     (x, y)
   |     ^^^^^^ function was supposed to return data with lifetime `'d` but it is returning data with lifetime `'b`
   |
   = help: consider adding the following bound: `'b: 'd`

help: the following changes may resolve your lifetime errors
   |
   = help: add bound `'a: 'c`
   = help: add bound `'b: 'd`

error: lifetime may not live long enough
  --> $DIR/outlives-suggestion-more.rs:11:5
   |
LL | fn foo2<'a, 'b, 'c>(x: &'a usize, y: &'b usize) -> (&'c usize, &'static usize) {
   |         --      -- lifetime `'c` defined here
   |         |
   |         lifetime `'a` defined here
LL |     (x, y)
   |     ^^^^^^ function was supposed to return data with lifetime `'c` but it is returning data with lifetime `'a`
   |
   = help: consider adding the following bound: `'a: 'c`

error: lifetime may not live long enough
  --> $DIR/outlives-suggestion-more.rs:11:5
   |
LL | fn foo2<'a, 'b, 'c>(x: &'a usize, y: &'b usize) -> (&'c usize, &'static usize) {
   |             -- lifetime `'b` defined here
LL |     (x, y)
   |     ^^^^^^ returning this value requires that `'b` must outlive `'static`

help: the following changes may resolve your lifetime errors
   |
   = help: add bound `'a: 'c`
   = help: replace `'b` with `'static`

error: lifetime may not live long enough
  --> $DIR/outlives-suggestion-more.rs:21:5
   |
LL | fn foo3<'a, 'b, 'c, 'd, 'e>(
   |         --  -- lifetime `'b` defined here
   |         |
   |         lifetime `'a` defined here
...
LL |     (x, y, z)
   |     ^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
   |
   = help: consider adding the following bound: `'a: 'b`

error: lifetime may not live long enough
  --> $DIR/outlives-suggestion-more.rs:21:5
   |
LL | fn foo3<'a, 'b, 'c, 'd, 'e>(
   |         --  -- lifetime `'b` defined here
   |         |
   |         lifetime `'a` defined here
...
LL |     (x, y, z)
   |     ^^^^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
   |
   = help: consider adding the following bound: `'b: 'a`

error: lifetime may not live long enough
  --> $DIR/outlives-suggestion-more.rs:21:5
   |
LL | fn foo3<'a, 'b, 'c, 'd, 'e>(
   |                 -- lifetime `'c` defined here
...
LL |     (x, y, z)
   |     ^^^^^^^^^ returning this value requires that `'c` must outlive `'static`

help: the following changes may resolve your lifetime errors
   |
   = help: `'a` and `'b` must be the same: replace one with the other
   = help: replace `'c` with `'static`

error: aborting due to 7 previous errors