@@ -239,20 +239,20 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
239239 var : ty:: BoundVar :: from_u32 ( index) ,
240240 kind : ty:: BrNamed ( def_id, name) ,
241241 } ;
242- tcx . mk_re_late_bound ( debruijn, br)
242+ ty :: Region :: new_late_bound ( tcx , debruijn, br)
243243 }
244244
245245 Some ( rbv:: ResolvedArg :: EarlyBound ( def_id) ) => {
246246 let name = tcx. hir ( ) . ty_param_name ( def_id. expect_local ( ) ) ;
247247 let item_def_id = tcx. hir ( ) . ty_param_owner ( def_id. expect_local ( ) ) ;
248248 let generics = tcx. generics_of ( item_def_id) ;
249249 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 } )
251251 }
252252
253253 Some ( rbv:: ResolvedArg :: Free ( scope, id) ) => {
254254 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) )
256256
257257 // (*) -- not late-bound, won't change
258258 }
@@ -269,7 +269,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
269269 // elision. `resolve_lifetime` should have
270270 // reported an error in this case -- but if
271271 // not, let's error out.
272- tcx. mk_re_error_with_message (
272+ ty:: Region :: new_error_with_message (
273+ tcx,
273274 lifetime. ident . span ,
274275 "unelided lifetime in signature" ,
275276 )
@@ -485,7 +486,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
485486 debug ! ( ?param, "unelided lifetime in signature" ) ;
486487
487488 // 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,
489491 self . span ,
490492 "unelided lifetime in signature" ,
491493 )
@@ -1219,15 +1221,15 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
12191221 let substs =
12201222 candidate. skip_binder ( ) . substs . extend_to ( tcx, assoc_item. def_id , |param, _| {
12211223 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 ( ) ,
12311233 GenericParamDefKind :: Type { .. } => tcx
12321234 . mk_bound (
12331235 ty:: INNERMOST ,
@@ -1804,7 +1806,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
18041806 } else {
18051807 err. emit ( )
18061808 } ;
1807- tcx . mk_re_error ( e)
1809+ ty :: Region :: new_error ( tcx , e)
18081810 } )
18091811 }
18101812 } )
0 commit comments