summary refs log tree commit diff
path: root/src/test/ui/wf/wf-static-method.stderr
blob: c02a8fe4aaff62a532c7a3116db3a011b760c86c (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
  --> $DIR/wf-static-method.rs:17:9
   |
LL |         u
   |         ^
   |
note: ...the reference is valid for the lifetime `'a` as defined on the impl at 14:6...
  --> $DIR/wf-static-method.rs:14:6
   |
LL | impl<'a, 'b> Foo<'a, 'b, Evil<'a, 'b>> for () {
   |      ^^
note: ...but the borrowed content is only valid for the lifetime `'b` as defined on the impl at 14:10
  --> $DIR/wf-static-method.rs:14:10
   |
LL | impl<'a, 'b> Foo<'a, 'b, Evil<'a, 'b>> for () {
   |          ^^

error[E0478]: lifetime bound not satisfied
  --> $DIR/wf-static-method.rs:26:18
   |
LL |         let me = Self::make_me();
   |                  ^^^^
   |
note: lifetime parameter instantiated with the lifetime `'b` as defined on the impl at 23:10
  --> $DIR/wf-static-method.rs:23:10
   |
LL | impl<'a, 'b> Foo<'a, 'b, ()> for IndirectEvil<'a, 'b> {
   |          ^^
note: but lifetime parameter must outlive the lifetime `'a` as defined on the impl at 23:6
  --> $DIR/wf-static-method.rs:23:6
   |
LL | impl<'a, 'b> Foo<'a, 'b, ()> for IndirectEvil<'a, 'b> {
   |      ^^

error[E0312]: lifetime of reference outlives lifetime of borrowed content...
  --> $DIR/wf-static-method.rs:33:9
   |
LL |         u
   |         ^
   |
note: ...the reference is valid for the lifetime `'a` as defined on the impl at 31:6...
  --> $DIR/wf-static-method.rs:31:6
   |
LL | impl<'a, 'b> Evil<'a, 'b> {
   |      ^^
note: ...but the borrowed content is only valid for the lifetime `'b` as defined on the impl at 31:10
  --> $DIR/wf-static-method.rs:31:10
   |
LL | impl<'a, 'b> Evil<'a, 'b> {
   |          ^^

error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
  --> $DIR/wf-static-method.rs:41:5
   |
LL |     <()>::static_evil(b)
   |     ^^^^^^^^^^^^^^^^^
   |
note: first, the lifetime cannot outlive the lifetime `'b` as defined on the function body at 40:13...
  --> $DIR/wf-static-method.rs:40:13
   |
LL | fn evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |             ^^
note: ...so that reference does not outlive borrowed content
  --> $DIR/wf-static-method.rs:41:23
   |
LL |     <()>::static_evil(b)
   |                       ^
note: but, the lifetime must be valid for the lifetime `'a` as defined on the function body at 40:9...
  --> $DIR/wf-static-method.rs:40:9
   |
LL | fn evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |         ^^
note: ...so that reference does not outlive borrowed content
  --> $DIR/wf-static-method.rs:41:5
   |
LL |     <()>::static_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^

error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
  --> $DIR/wf-static-method.rs:45:5
   |
LL |     <IndirectEvil>::static_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: first, the lifetime cannot outlive the lifetime `'b` as defined on the function body at 44:22...
  --> $DIR/wf-static-method.rs:44:22
   |
LL | fn indirect_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |                      ^^
note: ...so that reference does not outlive borrowed content
  --> $DIR/wf-static-method.rs:45:33
   |
LL |     <IndirectEvil>::static_evil(b)
   |                                 ^
note: but, the lifetime must be valid for the lifetime `'a` as defined on the function body at 44:18...
  --> $DIR/wf-static-method.rs:44:18
   |
LL | fn indirect_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |                  ^^
note: ...so that reference does not outlive borrowed content
  --> $DIR/wf-static-method.rs:45:5
   |
LL |     <IndirectEvil>::static_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
  --> $DIR/wf-static-method.rs:50:5
   |
LL |     <Evil>::inherent_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
note: first, the lifetime cannot outlive the lifetime `'b` as defined on the function body at 49:22...
  --> $DIR/wf-static-method.rs:49:22
   |
LL | fn inherent_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |                      ^^
note: ...so that reference does not outlive borrowed content
  --> $DIR/wf-static-method.rs:50:27
   |
LL |     <Evil>::inherent_evil(b)
   |                           ^
note: but, the lifetime must be valid for the lifetime `'a` as defined on the function body at 49:18...
  --> $DIR/wf-static-method.rs:49:18
   |
LL | fn inherent_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |                  ^^
note: ...so that reference does not outlive borrowed content
  --> $DIR/wf-static-method.rs:50:5
   |
LL |     <Evil>::inherent_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0312, E0478, E0495.
For more information about an error, try `rustc --explain E0312`.