@@ -278,19 +278,13 @@ fn resolve_bound_vars(tcx: TyCtxt<'_>, local_def_id: hir::OwnerId) -> ResolveBou
278
278
rbv
279
279
}
280
280
281
- fn late_arg_as_bound_arg < ' tcx > (
282
- tcx : TyCtxt < ' tcx > ,
283
- param : & GenericParam < ' tcx > ,
284
- ) -> ty:: BoundVariableKind {
281
+ fn late_arg_as_bound_arg < ' tcx > ( param : & GenericParam < ' tcx > ) -> ty:: BoundVariableKind {
285
282
let def_id = param. def_id . to_def_id ( ) ;
286
- let name = tcx. item_name ( def_id) ;
287
283
match param. kind {
288
284
GenericParamKind :: Lifetime { .. } => {
289
285
ty:: BoundVariableKind :: Region ( ty:: BoundRegionKind :: Named ( def_id) )
290
286
}
291
- GenericParamKind :: Type { .. } => {
292
- ty:: BoundVariableKind :: Ty ( ty:: BoundTyKind :: Param ( def_id, name) )
293
- }
287
+ GenericParamKind :: Type { .. } => ty:: BoundVariableKind :: Ty ( ty:: BoundTyKind :: Param ( def_id) ) ,
294
288
GenericParamKind :: Const { .. } => ty:: BoundVariableKind :: Const ,
295
289
}
296
290
}
@@ -304,7 +298,7 @@ fn generic_param_def_as_bound_arg(param: &ty::GenericParamDef) -> ty::BoundVaria
304
298
ty:: BoundVariableKind :: Region ( ty:: BoundRegionKind :: Named ( param. def_id ) )
305
299
}
306
300
ty:: GenericParamDefKind :: Type { .. } => {
307
- ty:: BoundVariableKind :: Ty ( ty:: BoundTyKind :: Param ( param. def_id , param . name ) )
301
+ ty:: BoundVariableKind :: Ty ( ty:: BoundTyKind :: Param ( param. def_id ) )
308
302
}
309
303
ty:: GenericParamDefKind :: Const { .. } => ty:: BoundVariableKind :: Const ,
310
304
}
@@ -385,7 +379,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
385
379
trait_ref. bound_generic_params . iter ( ) . enumerate ( ) . map ( |( late_bound_idx, param) | {
386
380
let arg = ResolvedArg :: late ( initial_bound_vars + late_bound_idx as u32 , param) ;
387
381
bound_vars. insert ( param. def_id , arg) ;
388
- late_arg_as_bound_arg ( self . tcx , param)
382
+ late_arg_as_bound_arg ( param)
389
383
} ) ;
390
384
binders. extend ( binders_iter) ;
391
385
@@ -484,7 +478,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
484
478
. map ( |( late_bound_idx, param) | {
485
479
(
486
480
( param. def_id , ResolvedArg :: late ( late_bound_idx as u32 , param) ) ,
487
- late_arg_as_bound_arg ( self . tcx , param) ,
481
+ late_arg_as_bound_arg ( param) ,
488
482
)
489
483
} )
490
484
. unzip ( ) ;
@@ -717,7 +711,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
717
711
. map ( |( late_bound_idx, param) | {
718
712
(
719
713
( param. def_id , ResolvedArg :: late ( late_bound_idx as u32 , param) ) ,
720
- late_arg_as_bound_arg ( self . tcx , param) ,
714
+ late_arg_as_bound_arg ( param) ,
721
715
)
722
716
} )
723
717
. unzip ( ) ;
@@ -747,7 +741,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
747
741
. map ( |( late_bound_idx, param) | {
748
742
(
749
743
( param. def_id , ResolvedArg :: late ( late_bound_idx as u32 , param) ) ,
750
- late_arg_as_bound_arg ( self . tcx , param) ,
744
+ late_arg_as_bound_arg ( param) ,
751
745
)
752
746
} )
753
747
. unzip ( ) ;
@@ -956,7 +950,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
956
950
. map ( |( late_bound_idx, param) | {
957
951
(
958
952
( param. def_id , ResolvedArg :: late ( late_bound_idx as u32 , param) ) ,
959
- late_arg_as_bound_arg ( self . tcx , param) ,
953
+ late_arg_as_bound_arg ( param) ,
960
954
)
961
955
} )
962
956
. unzip ( ) ;
@@ -1170,7 +1164,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
1170
1164
matches ! ( param. kind, GenericParamKind :: Lifetime { .. } )
1171
1165
&& self . tcx . is_late_bound ( param. hir_id )
1172
1166
} )
1173
- . map ( |param| late_arg_as_bound_arg ( self . tcx , param) )
1167
+ . map ( |param| late_arg_as_bound_arg ( param) )
1174
1168
. collect ( ) ;
1175
1169
self . record_late_bound_vars ( hir_id, binders) ;
1176
1170
let scope = Scope :: Binder {
0 commit comments