summaryrefslogtreecommitdiffstats
path: root/src/test/ui/wf/wf-static-method.stderr
blob: 161609a5f86a17ae5d4d5014f74c5f76b65a4a51 (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
error: lifetime may not live long enough
  --> $DIR/wf-static-method.rs:17:9
   |
LL | impl<'a, 'b> Foo<'a, 'b, Evil<'a, 'b>> for () {
   |      --  -- lifetime `'b` defined here
   |      |
   |      lifetime `'a` defined here
...
LL |         u
   |         ^ associated 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/wf-static-method.rs:27:18
   |
LL | impl<'a, 'b> Foo<'a, 'b, ()> for IndirectEvil<'a, 'b> {
   |      --  -- lifetime `'b` defined here
   |      |
   |      lifetime `'a` defined here
...
LL |         let me = Self::make_me();
   |                  ^^^^^^^^^^^^^ requires that `'b` must outlive `'a`
   |
   = help: consider adding the following bound: `'b: 'a`

error: lifetime may not live long enough
  --> $DIR/wf-static-method.rs:35:9
   |
LL | impl<'a, 'b> Evil<'a, 'b> {
   |      --  -- lifetime `'b` defined here
   |      |
   |      lifetime `'a` defined here
LL |     fn inherent_evil(u: &'b u32) -> &'a u32 {
LL |         u
   |         ^ associated 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/wf-static-method.rs:44:5
   |
LL | fn evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |         --  -- lifetime `'b` defined here
   |         |
   |         lifetime `'a` defined here
LL |     <()>::static_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^ 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/wf-static-method.rs:49:5
   |
LL | fn indirect_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |                  --  -- lifetime `'b` defined here
   |                  |
   |                  lifetime `'a` defined here
LL |     <IndirectEvil>::static_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/wf-static-method.rs:54:5
   |
LL | fn inherent_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |                  --  -- lifetime `'b` defined here
   |                  |
   |                  lifetime `'a` defined here
LL |     <Evil>::inherent_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ 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: aborting due to 6 previous errors