@@ -13,14 +13,15 @@ LL | static a: RefCell<HashMap<i32, Vec<Vec<Foo<'static, 'static>>>>> = RefC
13
13
error[E0106]: missing lifetime specifiers
14
14
--> $DIR/missing-lifetime-specifier.rs:18:44
15
15
|
16
- LL | static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::new());
17
- | ^^^ expected 2 lifetime parameters
18
- |
19
- = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
20
- help: consider using the `'static` lifetime
21
- |
22
- LL | static a: RefCell<HashMap<i32, Vec<Vec<Foo<'static, 'static>>>>> = RefCell::new(HashMap::new());
23
- | ~~~~~~~~~~~~~~~~~~~~~
16
+ LL | / thread_local! {
17
+ LL | | static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::new());
18
+ | | ^^^ expected 2 lifetime parameters
19
+ LL | |
20
+ LL | |
21
+ LL | | }
22
+ | |_-
23
+ |
24
+ = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 3 lifetimes it is borrowed from
24
25
25
26
error[E0106]: missing lifetime specifier
26
27
--> $DIR/missing-lifetime-specifier.rs:23:44
@@ -49,26 +50,32 @@ LL | static b: RefCell<HashMap<i32, Vec<Vec<&Bar<'static, 'static>>>>> = Ref
49
50
error[E0106]: missing lifetime specifier
50
51
--> $DIR/missing-lifetime-specifier.rs:23:44
51
52
|
52
- LL | static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap::new());
53
- | ^ expected named lifetime parameter
54
- |
55
- = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
56
- help: consider using the `'static` lifetime
57
- |
58
- LL | static b: RefCell<HashMap<i32, Vec<Vec<&'static Bar>>>> = RefCell::new(HashMap::new());
59
- | ~~~~~~~~
53
+ LL | / thread_local! {
54
+ LL | | static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap::new());
55
+ | | ^ expected named lifetime parameter
56
+ LL | |
57
+ LL | |
58
+ LL | |
59
+ LL | |
60
+ LL | | }
61
+ | |_-
62
+ |
63
+ = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 4 lifetimes it is borrowed from
60
64
61
65
error[E0106]: missing lifetime specifiers
62
66
--> $DIR/missing-lifetime-specifier.rs:23:45
63
67
|
64
- LL | static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap::new());
65
- | ^^^ expected 2 lifetime parameters
66
- |
67
- = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
68
- help: consider using the `'static` lifetime
69
- |
70
- LL | static b: RefCell<HashMap<i32, Vec<Vec<&Bar<'static, 'static>>>>> = RefCell::new(HashMap::new());
71
- | ~~~~~~~~~~~~~~~~~~~~~
68
+ LL | / thread_local! {
69
+ LL | | static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap::new());
70
+ | | ^^^ expected 2 lifetime parameters
71
+ LL | |
72
+ LL | |
73
+ LL | |
74
+ LL | |
75
+ LL | | }
76
+ | |_-
77
+ |
78
+ = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 4 lifetimes it is borrowed from
72
79
73
80
error[E0106]: missing lifetime specifiers
74
81
--> $DIR/missing-lifetime-specifier.rs:30:48
@@ -85,14 +92,15 @@ LL | static c: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> =
85
92
error[E0106]: missing lifetime specifiers
86
93
--> $DIR/missing-lifetime-specifier.rs:30:48
87
94
|
88
- LL | static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(HashMap::new());
89
- | ^ expected 2 lifetime parameters
90
- |
91
- = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
92
- help: consider using the `'static` lifetime
95
+ LL | / thread_local! {
96
+ LL | | static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(HashMap::new());
97
+ | | ^ expected 2 lifetime parameters
98
+ LL | |
99
+ LL | |
100
+ LL | | }
101
+ | |_-
93
102
|
94
- LL | static c: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
95
- | +++++++++++++++++
103
+ = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 3 lifetimes it is borrowed from
96
104
97
105
error[E0106]: missing lifetime specifier
98
106
--> $DIR/missing-lifetime-specifier.rs:35:44
@@ -121,26 +129,50 @@ LL | static d: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>>
121
129
error[E0106]: missing lifetime specifier
122
130
--> $DIR/missing-lifetime-specifier.rs:35:44
123
131
|
124
- LL | static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(HashMap::new());
125
- | ^ expected named lifetime parameter
126
- |
127
- = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
128
- help: consider using the `'static` lifetime
129
- |
130
- LL | static d: RefCell<HashMap<i32, Vec<Vec<&'static Tar<i32>>>>> = RefCell::new(HashMap::new());
131
- | ~~~~~~~~
132
+ LL | / thread_local! {
133
+ LL | | static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(HashMap::new());
134
+ | | ^ expected named lifetime parameter
135
+ LL | |
136
+ LL | |
137
+ LL | |
138
+ LL | |
139
+ LL | | }
140
+ | |_-
141
+ |
142
+ = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 4 lifetimes it is borrowed from
132
143
133
144
error[E0106]: missing lifetime specifiers
134
145
--> $DIR/missing-lifetime-specifier.rs:35:49
135
146
|
136
- LL | static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(HashMap::new());
137
- | ^ expected 2 lifetime parameters
147
+ LL | / thread_local! {
148
+ LL | | static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(HashMap::new());
149
+ | | ^ expected 2 lifetime parameters
150
+ LL | |
151
+ LL | |
152
+ LL | |
153
+ LL | |
154
+ LL | | }
155
+ | |_-
156
+ |
157
+ = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 4 lifetimes it is borrowed from
158
+
159
+ error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
160
+ --> $DIR/missing-lifetime-specifier.rs:43:44
138
161
|
139
- = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
140
- help: consider using the `'static` lifetime
162
+ LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
163
+ | ^^^ ------- supplied 1 lifetime argument
164
+ | |
165
+ | expected 2 lifetime arguments
141
166
|
142
- LL | static d: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
143
- | +++++++++++++++++
167
+ note: union defined here, with 2 lifetime parameters: `'t`, `'k`
168
+ --> $DIR/missing-lifetime-specifier.rs:11:11
169
+ |
170
+ LL | pub union Qux<'t, 'k, I> {
171
+ | ^^^ -- --
172
+ help: add missing lifetime argument
173
+ |
174
+ LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, '_, i32>>>>> = RefCell::new(HashMap::new());
175
+ | ++++
144
176
145
177
error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
146
178
--> $DIR/missing-lifetime-specifier.rs:43:44
@@ -157,7 +189,7 @@ LL | pub union Qux<'t, 'k, I> {
157
189
| ^^^ -- --
158
190
help: add missing lifetime argument
159
191
|
160
- LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, '_ , i32>>>>> = RefCell::new(HashMap::new());
192
+ LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'k , i32>>>>> = RefCell::new(HashMap::new());
161
193
| ++++
162
194
163
195
error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
@@ -215,7 +247,7 @@ LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, '_, i32>>>>> = RefC
215
247
| ++++
216
248
217
249
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
218
- --> $DIR/missing-lifetime-specifier.rs:50 :45
250
+ --> $DIR/missing-lifetime-specifier.rs:51 :45
219
251
|
220
252
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
221
253
| ^^^ ------- supplied 1 lifetime argument
@@ -233,7 +265,7 @@ LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, '_, i32>>>>> = Ref
233
265
| ++++
234
266
235
267
error[E0106]: missing lifetime specifier
236
- --> $DIR/missing-lifetime-specifier.rs:50 :44
268
+ --> $DIR/missing-lifetime-specifier.rs:51 :44
237
269
|
238
270
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
239
271
| ^ expected named lifetime parameter
@@ -245,7 +277,7 @@ LL | static f: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, i32>>>>> =
245
277
| ~~~~~~~~
246
278
247
279
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
248
- --> $DIR/missing-lifetime-specifier.rs:50 :45
280
+ --> $DIR/missing-lifetime-specifier.rs:51 :45
249
281
|
250
282
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
251
283
| ^^^ ------- supplied 1 lifetime argument
@@ -263,19 +295,40 @@ LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'k, i32>>>>> = Ref
263
295
| ++++
264
296
265
297
error[E0106]: missing lifetime specifier
266
- --> $DIR/missing-lifetime-specifier.rs:50:44
298
+ --> $DIR/missing-lifetime-specifier.rs:51:44
299
+ |
300
+ LL | / thread_local! {
301
+ LL | | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
302
+ | | ^ expected named lifetime parameter
303
+ LL | |
304
+ LL | |
305
+ ... |
306
+ LL | |
307
+ LL | | }
308
+ | |_-
309
+ |
310
+ = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 3 lifetimes it is borrowed from
311
+
312
+ error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
313
+ --> $DIR/missing-lifetime-specifier.rs:51:45
267
314
|
268
315
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
269
- | ^ expected named lifetime parameter
316
+ | ^^^ ------- supplied 1 lifetime argument
317
+ | |
318
+ | expected 2 lifetime arguments
270
319
|
271
- = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
272
- help: consider using the `'static` lifetime
320
+ note: trait defined here, with 2 lifetime parameters: `'t`, `'k`
321
+ --> $DIR/missing- lifetime-specifier.rs:15:7
273
322
|
274
- LL | static f: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
275
- | ~~~~~~~~
323
+ LL | trait Tar<'t, 'k, I> {}
324
+ | ^^^ -- --
325
+ help: add missing lifetime argument
326
+ |
327
+ LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'k, i32>>>>> = RefCell::new(HashMap::new());
328
+ | ++++
276
329
277
330
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
278
- --> $DIR/missing-lifetime-specifier.rs:50 :45
331
+ --> $DIR/missing-lifetime-specifier.rs:51 :45
279
332
|
280
333
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
281
334
| ^^^ ------- supplied 1 lifetime argument
@@ -293,7 +346,7 @@ LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'k, i32>>>>> = Ref
293
346
| ++++
294
347
295
348
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
296
- --> $DIR/missing-lifetime-specifier.rs:50 :45
349
+ --> $DIR/missing-lifetime-specifier.rs:51 :45
297
350
|
298
351
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
299
352
| ^^^ ------- supplied 1 lifetime argument
@@ -310,7 +363,7 @@ help: add missing lifetime argument
310
363
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, '_, i32>>>>> = RefCell::new(HashMap::new());
311
364
| ++++
312
365
313
- error: aborting due to 22 previous errors
366
+ error: aborting due to 24 previous errors
314
367
315
368
Some errors have detailed explanations: E0106, E0107.
316
369
For more information about an error, try `rustc --explain E0106`.
0 commit comments