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