File tree 3 files changed +4
-13
lines changed
3 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -843,8 +843,9 @@ impl<'tcx> BorrowckInferCtxt<'tcx> {
843
843
{
844
844
let ( value, _map) = self . tcx . instantiate_bound_regions ( value, |br| {
845
845
debug ! ( ?br) ;
846
+ let kind = ty:: LateParamRegionKind :: from_bound ( br. var , br. kind ) ;
846
847
let liberated_region =
847
- ty:: Region :: new_late_param_from_bound ( self . tcx , all_outlive_scope. to_def_id ( ) , br ) ;
848
+ ty:: Region :: new_late_param ( self . tcx , all_outlive_scope. to_def_id ( ) , kind ) ;
848
849
let region_vid = {
849
850
let name = match br. kind . get_name ( ) {
850
851
Some ( name) => name,
Original file line number Diff line number Diff line change @@ -270,7 +270,8 @@ impl<'tcx> TyCtxt<'tcx> {
270
270
T : TypeFoldable < TyCtxt < ' tcx > > ,
271
271
{
272
272
self . instantiate_bound_regions_uncached ( value, |br| {
273
- ty:: Region :: new_late_param_from_bound ( self , all_outlive_scope, br)
273
+ let kind = ty:: LateParamRegionKind :: from_bound ( br. var , br. kind ) ;
274
+ ty:: Region :: new_late_param ( self , all_outlive_scope, kind)
274
275
} )
275
276
}
276
277
Original file line number Diff line number Diff line change @@ -76,17 +76,6 @@ impl<'tcx> Region<'tcx> {
76
76
tcx. intern_region ( ty:: ReLateParam ( data) )
77
77
}
78
78
79
- #[ inline]
80
- pub fn new_late_param_from_bound (
81
- tcx : TyCtxt < ' tcx > ,
82
- scope : DefId ,
83
- bound : BoundRegion ,
84
- ) -> Region < ' tcx > {
85
- let data =
86
- LateParamRegion { scope, kind : LateParamRegionKind :: from_bound ( bound. var , bound. kind ) } ;
87
- tcx. intern_region ( ty:: ReLateParam ( data) )
88
- }
89
-
90
79
#[ inline]
91
80
pub fn new_var ( tcx : TyCtxt < ' tcx > , v : ty:: RegionVid ) -> Region < ' tcx > {
92
81
// Use a pre-interned one when possible.
You can’t perform that action at this time.
0 commit comments