1
1
error: lifetime may not live long enough
2
- --> $DIR/wf-static-method.rs:17:9
3
- |
4
- LL | impl<'a, 'b> Foo<'a, 'b, Evil<'a, 'b>> for () {
5
- | -- -- lifetime `'b` defined here
6
- | |
7
- | lifetime `'a` defined here
8
- ...
9
- LL | u
10
- | ^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
11
- |
12
- = help: consider adding the following bound: `'b: 'a`
13
-
14
- error: lifetime may not live long enough
15
- --> $DIR/wf-static-method.rs:27:18
16
- |
17
- LL | impl<'a, 'b> Foo<'a, 'b, ()> for IndirectEvil<'a, 'b> {
18
- | -- -- lifetime `'b` defined here
19
- | |
20
- | lifetime `'a` defined here
21
- ...
22
- LL | let me = Self::make_me();
23
- | ^^^^^^^^^^^^^ requires that `'b` must outlive `'a`
24
- |
25
- = help: consider adding the following bound: `'b: 'a`
26
-
27
- error: lifetime may not live long enough
28
- --> $DIR/wf-static-method.rs:35:9
29
- |
30
- LL | impl<'a, 'b> Evil<'a, 'b> {
31
- | -- -- lifetime `'b` defined here
32
- | |
33
- | lifetime `'a` defined here
34
- LL | fn inherent_evil(u: &'b u32) -> &'a u32 {
35
- LL | u
36
- | ^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
37
- |
38
- = help: consider adding the following bound: `'b: 'a`
39
-
40
- error: lifetime may not live long enough
41
- --> $DIR/wf-static-method.rs:44:5
2
+ --> $DIR/wf-static-method.rs:37:5
42
3
|
43
4
LL | fn evil<'a, 'b>(b: &'b u32) -> &'a u32 {
44
5
| -- -- lifetime `'b` defined here
@@ -50,7 +11,7 @@ LL | <()>::static_evil(b)
50
11
= help: consider adding the following bound: `'b: 'a`
51
12
52
13
error: lifetime may not live long enough
53
- --> $DIR/wf-static-method.rs:49 :5
14
+ --> $DIR/wf-static-method.rs:42 :5
54
15
|
55
16
LL | fn indirect_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
56
17
| -- -- lifetime `'b` defined here
@@ -62,7 +23,7 @@ LL | <IndirectEvil>::static_evil(b)
62
23
= help: consider adding the following bound: `'b: 'a`
63
24
64
25
error: lifetime may not live long enough
65
- --> $DIR/wf-static-method.rs:54 :5
26
+ --> $DIR/wf-static-method.rs:47 :5
66
27
|
67
28
LL | fn inherent_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
68
29
| -- -- lifetime `'b` defined here
@@ -73,5 +34,5 @@ LL | <Evil>::inherent_evil(b)
73
34
|
74
35
= help: consider adding the following bound: `'b: 'a`
75
36
76
- error: aborting due to 6 previous errors
37
+ error: aborting due to 3 previous errors
77
38
0 commit comments