@@ -131,38 +131,34 @@ pub trait TyDecoder<'tcx>: Decoder {
131
131
}
132
132
133
133
#[ inline]
134
- pub fn decode_arena_allocable < ' a , ' tcx , D , T : ArenaAllocatable + Decodable > (
134
+ pub fn decode_arena_allocable < D , T : ArenaAllocatable + Decodable > (
135
135
decoder : & mut D
136
136
) -> Result < & ' tcx T , D :: Error >
137
137
where D : TyDecoder < ' tcx > ,
138
- ' tcx : ' a ,
139
138
{
140
139
Ok ( decoder. tcx ( ) . arena . alloc ( Decodable :: decode ( decoder) ?) )
141
140
}
142
141
143
142
#[ inline]
144
- pub fn decode_arena_allocable_slice < ' a , ' tcx , D , T : ArenaAllocatable + Decodable > (
143
+ pub fn decode_arena_allocable_slice < D , T : ArenaAllocatable + Decodable > (
145
144
decoder : & mut D
146
145
) -> Result < & ' tcx [ T ] , D :: Error >
147
146
where D : TyDecoder < ' tcx > ,
148
- ' tcx : ' a ,
149
147
{
150
148
Ok ( decoder. tcx ( ) . arena . alloc_from_iter ( <Vec < T > as Decodable >:: decode ( decoder) ?) )
151
149
}
152
150
153
151
#[ inline]
154
- pub fn decode_cnum < ' a , ' tcx , D > ( decoder : & mut D ) -> Result < CrateNum , D :: Error >
152
+ pub fn decode_cnum < D > ( decoder : & mut D ) -> Result < CrateNum , D :: Error >
155
153
where D : TyDecoder < ' tcx > ,
156
- ' tcx : ' a ,
157
154
{
158
155
let cnum = CrateNum :: from_u32 ( u32:: decode ( decoder) ?) ;
159
156
Ok ( decoder. map_encoded_cnum_to_current ( cnum) )
160
157
}
161
158
162
159
#[ inline]
163
- pub fn decode_ty < ' a , ' tcx , D > ( decoder : & mut D ) -> Result < Ty < ' tcx > , D :: Error >
160
+ pub fn decode_ty < D > ( decoder : & mut D ) -> Result < Ty < ' tcx > , D :: Error >
164
161
where D : TyDecoder < ' tcx > ,
165
- ' tcx : ' a ,
166
162
{
167
163
// Handle shorthands first, if we have an usize > 0x80.
168
164
if decoder. positioned_at_shorthand ( ) {
@@ -180,10 +176,9 @@ pub fn decode_ty<'a, 'tcx, D>(decoder: &mut D) -> Result<Ty<'tcx>, D::Error>
180
176
}
181
177
182
178
#[ inline]
183
- pub fn decode_predicates < ' a , ' tcx , D > ( decoder : & mut D )
179
+ pub fn decode_predicates < D > ( decoder : & mut D )
184
180
-> Result < ty:: GenericPredicates < ' tcx > , D :: Error >
185
181
where D : TyDecoder < ' tcx > ,
186
- ' tcx : ' a ,
187
182
{
188
183
Ok ( ty:: GenericPredicates {
189
184
parent : Decodable :: decode ( decoder) ?,
@@ -205,59 +200,53 @@ pub fn decode_predicates<'a, 'tcx, D>(decoder: &mut D)
205
200
}
206
201
207
202
#[ inline]
208
- pub fn decode_substs < ' a , ' tcx , D > ( decoder : & mut D ) -> Result < SubstsRef < ' tcx > , D :: Error >
203
+ pub fn decode_substs < D > ( decoder : & mut D ) -> Result < SubstsRef < ' tcx > , D :: Error >
209
204
where D : TyDecoder < ' tcx > ,
210
- ' tcx : ' a ,
211
205
{
212
206
let len = decoder. read_usize ( ) ?;
213
207
let tcx = decoder. tcx ( ) ;
214
208
Ok ( tcx. mk_substs ( ( 0 ..len) . map ( |_| Decodable :: decode ( decoder) ) ) ?)
215
209
}
216
210
217
211
#[ inline]
218
- pub fn decode_region < ' a , ' tcx , D > ( decoder : & mut D ) -> Result < ty:: Region < ' tcx > , D :: Error >
212
+ pub fn decode_region < D > ( decoder : & mut D ) -> Result < ty:: Region < ' tcx > , D :: Error >
219
213
where D : TyDecoder < ' tcx > ,
220
- ' tcx : ' a ,
221
214
{
222
215
Ok ( decoder. tcx ( ) . mk_region ( Decodable :: decode ( decoder) ?) )
223
216
}
224
217
225
218
#[ inline]
226
- pub fn decode_ty_slice < ' a , ' tcx , D > ( decoder : & mut D )
219
+ pub fn decode_ty_slice < D > ( decoder : & mut D )
227
220
-> Result < & ' tcx ty:: List < Ty < ' tcx > > , D :: Error >
228
221
where D : TyDecoder < ' tcx > ,
229
- ' tcx : ' a ,
230
222
{
231
223
let len = decoder. read_usize ( ) ?;
232
224
Ok ( decoder. tcx ( ) . mk_type_list ( ( 0 ..len) . map ( |_| Decodable :: decode ( decoder) ) ) ?)
233
225
}
234
226
235
227
#[ inline]
236
- pub fn decode_adt_def < ' a , ' tcx , D > ( decoder : & mut D )
228
+ pub fn decode_adt_def < D > ( decoder : & mut D )
237
229
-> Result < & ' tcx ty:: AdtDef , D :: Error >
238
230
where D : TyDecoder < ' tcx > ,
239
- ' tcx : ' a ,
240
231
{
241
232
let def_id = DefId :: decode ( decoder) ?;
242
233
Ok ( decoder. tcx ( ) . adt_def ( def_id) )
243
234
}
244
235
245
236
#[ inline]
246
- pub fn decode_existential_predicate_slice < ' a , ' tcx , D > ( decoder : & mut D )
237
+ pub fn decode_existential_predicate_slice < D > ( decoder : & mut D )
247
238
-> Result < & ' tcx ty:: List < ty:: ExistentialPredicate < ' tcx > > , D :: Error >
248
239
where D : TyDecoder < ' tcx > ,
249
- ' tcx : ' a ,
250
240
{
251
241
let len = decoder. read_usize ( ) ?;
252
242
Ok ( decoder. tcx ( )
253
243
. mk_existential_predicates ( ( 0 ..len) . map ( |_| Decodable :: decode ( decoder) ) ) ?)
254
244
}
255
245
256
246
#[ inline]
257
- pub fn decode_canonical_var_infos < ' a , ' tcx , D > ( decoder : & mut D )
247
+ pub fn decode_canonical_var_infos < D > ( decoder : & mut D )
258
248
-> Result < CanonicalVarInfos < ' tcx > , D :: Error >
259
249
where D : TyDecoder < ' tcx > ,
260
- ' tcx : ' a ,
261
250
{
262
251
let len = decoder. read_usize ( ) ?;
263
252
let interned: Result < Vec < CanonicalVarInfo > , _ > = ( 0 ..len) . map ( |_| Decodable :: decode ( decoder) )
@@ -267,19 +256,17 @@ pub fn decode_canonical_var_infos<'a, 'tcx, D>(decoder: &mut D)
267
256
}
268
257
269
258
#[ inline]
270
- pub fn decode_const < ' a , ' tcx , D > ( decoder : & mut D )
259
+ pub fn decode_const < D > ( decoder : & mut D )
271
260
-> Result < & ' tcx ty:: Const < ' tcx > , D :: Error >
272
261
where D : TyDecoder < ' tcx > ,
273
- ' tcx : ' a ,
274
262
{
275
263
Ok ( decoder. tcx ( ) . mk_const ( Decodable :: decode ( decoder) ?) )
276
264
}
277
265
278
266
#[ inline]
279
- pub fn decode_allocation < ' a , ' tcx , D > ( decoder : & mut D )
267
+ pub fn decode_allocation < D > ( decoder : & mut D )
280
268
-> Result < & ' tcx Allocation , D :: Error >
281
269
where D : TyDecoder < ' tcx > ,
282
- ' tcx : ' a ,
283
270
{
284
271
Ok ( decoder. tcx ( ) . intern_const_alloc ( Decodable :: decode ( decoder) ?) )
285
272
}
0 commit comments