@@ -239,20 +239,20 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
239
239
var : ty:: BoundVar :: from_u32 ( index) ,
240
240
kind : ty:: BrNamed ( def_id, name) ,
241
241
} ;
242
- tcx . mk_re_late_bound ( debruijn, br)
242
+ ty :: Region :: new_late_bound ( tcx , debruijn, br)
243
243
}
244
244
245
245
Some ( rbv:: ResolvedArg :: EarlyBound ( def_id) ) => {
246
246
let name = tcx. hir ( ) . ty_param_name ( def_id. expect_local ( ) ) ;
247
247
let item_def_id = tcx. hir ( ) . ty_param_owner ( def_id. expect_local ( ) ) ;
248
248
let generics = tcx. generics_of ( item_def_id) ;
249
249
let index = generics. param_def_id_to_index [ & def_id] ;
250
- tcx . mk_re_early_bound ( ty:: EarlyBoundRegion { def_id, index, name } )
250
+ ty :: Region :: new_early_bound ( tcx , ty:: EarlyBoundRegion { def_id, index, name } )
251
251
}
252
252
253
253
Some ( rbv:: ResolvedArg :: Free ( scope, id) ) => {
254
254
let name = lifetime_name ( id. expect_local ( ) ) ;
255
- tcx . mk_re_free ( scope, ty:: BrNamed ( id, name) )
255
+ ty :: Region :: new_free ( tcx , scope, ty:: BrNamed ( id, name) )
256
256
257
257
// (*) -- not late-bound, won't change
258
258
}
@@ -269,7 +269,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
269
269
// elision. `resolve_lifetime` should have
270
270
// reported an error in this case -- but if
271
271
// not, let's error out.
272
- tcx. mk_re_error_with_message (
272
+ ty:: Region :: new_error_with_message (
273
+ tcx,
273
274
lifetime. ident . span ,
274
275
"unelided lifetime in signature" ,
275
276
)
@@ -485,7 +486,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
485
486
debug ! ( ?param, "unelided lifetime in signature" ) ;
486
487
487
488
// This indicates an illegal lifetime in a non-assoc-trait position
488
- tcx. mk_re_error_with_message (
489
+ ty:: Region :: new_error_with_message (
490
+ tcx,
489
491
self . span ,
490
492
"unelided lifetime in signature" ,
491
493
)
@@ -1219,15 +1221,15 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
1219
1221
let substs =
1220
1222
candidate. skip_binder ( ) . substs . extend_to ( tcx, assoc_item. def_id , |param, _| {
1221
1223
let subst = match param. kind {
1222
- GenericParamDefKind :: Lifetime => tcx
1223
- . mk_re_late_bound (
1224
- ty:: INNERMOST ,
1225
- ty:: BoundRegion {
1226
- var : ty:: BoundVar :: from_usize ( num_bound_vars) ,
1227
- kind : ty:: BoundRegionKind :: BrNamed ( param. def_id , param. name ) ,
1228
- } ,
1229
- )
1230
- . into ( ) ,
1224
+ GenericParamDefKind :: Lifetime => ty :: Region :: new_late_bound (
1225
+ tcx ,
1226
+ ty:: INNERMOST ,
1227
+ ty:: BoundRegion {
1228
+ var : ty:: BoundVar :: from_usize ( num_bound_vars) ,
1229
+ kind : ty:: BoundRegionKind :: BrNamed ( param. def_id , param. name ) ,
1230
+ } ,
1231
+ )
1232
+ . into ( ) ,
1231
1233
GenericParamDefKind :: Type { .. } => tcx
1232
1234
. mk_bound (
1233
1235
ty:: INNERMOST ,
@@ -1804,7 +1806,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
1804
1806
} else {
1805
1807
err. emit ( )
1806
1808
} ;
1807
- tcx . mk_re_error ( e)
1809
+ ty :: Region :: new_error ( tcx , e)
1808
1810
} )
1809
1811
}
1810
1812
} )
0 commit comments