@@ -272,19 +272,13 @@ fn resolve_bound_vars(tcx: TyCtxt<'_>, local_def_id: hir::OwnerId) -> ResolveBou
272
272
rbv
273
273
}
274
274
275
- fn late_arg_as_bound_arg < ' tcx > (
276
- tcx : TyCtxt < ' tcx > ,
277
- param : & GenericParam < ' tcx > ,
278
- ) -> ty:: BoundVariableKind {
275
+ fn late_arg_as_bound_arg < ' tcx > ( param : & GenericParam < ' tcx > ) -> ty:: BoundVariableKind {
279
276
let def_id = param. def_id . to_def_id ( ) ;
280
- let name = tcx. item_name ( def_id) ;
281
277
match param. kind {
282
278
GenericParamKind :: Lifetime { .. } => {
283
279
ty:: BoundVariableKind :: Region ( ty:: BoundRegionKind :: Named ( def_id) )
284
280
}
285
- GenericParamKind :: Type { .. } => {
286
- ty:: BoundVariableKind :: Ty ( ty:: BoundTyKind :: Param ( def_id, name) )
287
- }
281
+ GenericParamKind :: Type { .. } => ty:: BoundVariableKind :: Ty ( ty:: BoundTyKind :: Param ( def_id) ) ,
288
282
GenericParamKind :: Const { .. } => ty:: BoundVariableKind :: Const ,
289
283
}
290
284
}
@@ -298,7 +292,7 @@ fn generic_param_def_as_bound_arg(param: &ty::GenericParamDef) -> ty::BoundVaria
298
292
ty:: BoundVariableKind :: Region ( ty:: BoundRegionKind :: Named ( param. def_id ) )
299
293
}
300
294
ty:: GenericParamDefKind :: Type { .. } => {
301
- ty:: BoundVariableKind :: Ty ( ty:: BoundTyKind :: Param ( param. def_id , param . name ) )
295
+ ty:: BoundVariableKind :: Ty ( ty:: BoundTyKind :: Param ( param. def_id ) )
302
296
}
303
297
ty:: GenericParamDefKind :: Const { .. } => ty:: BoundVariableKind :: Const ,
304
298
}
@@ -379,7 +373,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
379
373
trait_ref. bound_generic_params . iter ( ) . enumerate ( ) . map ( |( late_bound_idx, param) | {
380
374
let arg = ResolvedArg :: late ( initial_bound_vars + late_bound_idx as u32 , param) ;
381
375
bound_vars. insert ( param. def_id , arg) ;
382
- late_arg_as_bound_arg ( self . tcx , param)
376
+ late_arg_as_bound_arg ( param)
383
377
} ) ;
384
378
binders. extend ( binders_iter) ;
385
379
@@ -478,7 +472,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
478
472
. map ( |( late_bound_idx, param) | {
479
473
(
480
474
( param. def_id , ResolvedArg :: late ( late_bound_idx as u32 , param) ) ,
481
- late_arg_as_bound_arg ( self . tcx , param) ,
475
+ late_arg_as_bound_arg ( param) ,
482
476
)
483
477
} )
484
478
. unzip ( ) ;
@@ -710,7 +704,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
710
704
. map ( |( late_bound_idx, param) | {
711
705
(
712
706
( param. def_id , ResolvedArg :: late ( late_bound_idx as u32 , param) ) ,
713
- late_arg_as_bound_arg ( self . tcx , param) ,
707
+ late_arg_as_bound_arg ( param) ,
714
708
)
715
709
} )
716
710
. unzip ( ) ;
@@ -740,7 +734,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
740
734
. map ( |( late_bound_idx, param) | {
741
735
(
742
736
( param. def_id , ResolvedArg :: late ( late_bound_idx as u32 , param) ) ,
743
- late_arg_as_bound_arg ( self . tcx , param) ,
737
+ late_arg_as_bound_arg ( param) ,
744
738
)
745
739
} )
746
740
. unzip ( ) ;
@@ -949,7 +943,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
949
943
. map ( |( late_bound_idx, param) | {
950
944
(
951
945
( param. def_id , ResolvedArg :: late ( late_bound_idx as u32 , param) ) ,
952
- late_arg_as_bound_arg ( self . tcx , param) ,
946
+ late_arg_as_bound_arg ( param) ,
953
947
)
954
948
} )
955
949
. unzip ( ) ;
@@ -1163,7 +1157,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
1163
1157
matches ! ( param. kind, GenericParamKind :: Lifetime { .. } )
1164
1158
&& self . tcx . is_late_bound ( param. hir_id )
1165
1159
} )
1166
- . map ( |param| late_arg_as_bound_arg ( self . tcx , param) )
1160
+ . map ( |param| late_arg_as_bound_arg ( param) )
1167
1161
. collect ( ) ;
1168
1162
self . record_late_bound_vars ( hir_id, binders) ;
1169
1163
let scope = Scope :: Binder {
0 commit comments