@@ -272,19 +272,13 @@ fn resolve_bound_vars(tcx: TyCtxt<'_>, local_def_id: hir::OwnerId) -> ResolveBou
272272 rbv
273273}
274274
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 {
279276 let def_id = param. def_id . to_def_id ( ) ;
280- let name = tcx. item_name ( def_id) ;
281277 match param. kind {
282278 GenericParamKind :: Lifetime { .. } => {
283279 ty:: BoundVariableKind :: Region ( ty:: BoundRegionKind :: Named ( def_id) )
284280 }
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) ) ,
288282 GenericParamKind :: Const { .. } => ty:: BoundVariableKind :: Const ,
289283 }
290284}
@@ -298,7 +292,7 @@ fn generic_param_def_as_bound_arg(param: &ty::GenericParamDef) -> ty::BoundVaria
298292 ty:: BoundVariableKind :: Region ( ty:: BoundRegionKind :: Named ( param. def_id ) )
299293 }
300294 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 ) )
302296 }
303297 ty:: GenericParamDefKind :: Const { .. } => ty:: BoundVariableKind :: Const ,
304298 }
@@ -379,7 +373,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
379373 trait_ref. bound_generic_params . iter ( ) . enumerate ( ) . map ( |( late_bound_idx, param) | {
380374 let arg = ResolvedArg :: late ( initial_bound_vars + late_bound_idx as u32 , param) ;
381375 bound_vars. insert ( param. def_id , arg) ;
382- late_arg_as_bound_arg ( self . tcx , param)
376+ late_arg_as_bound_arg ( param)
383377 } ) ;
384378 binders. extend ( binders_iter) ;
385379
@@ -478,7 +472,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
478472 . map ( |( late_bound_idx, param) | {
479473 (
480474 ( 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) ,
482476 )
483477 } )
484478 . unzip ( ) ;
@@ -710,7 +704,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
710704 . map ( |( late_bound_idx, param) | {
711705 (
712706 ( 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) ,
714708 )
715709 } )
716710 . unzip ( ) ;
@@ -740,7 +734,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
740734 . map ( |( late_bound_idx, param) | {
741735 (
742736 ( 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) ,
744738 )
745739 } )
746740 . unzip ( ) ;
@@ -949,7 +943,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
949943 . map ( |( late_bound_idx, param) | {
950944 (
951945 ( 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) ,
953947 )
954948 } )
955949 . unzip ( ) ;
@@ -1163,7 +1157,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
11631157 matches ! ( param. kind, GenericParamKind :: Lifetime { .. } )
11641158 && self . tcx . is_late_bound ( param. hir_id )
11651159 } )
1166- . map ( |param| late_arg_as_bound_arg ( self . tcx , param) )
1160+ . map ( |param| late_arg_as_bound_arg ( param) )
11671161 . collect ( ) ;
11681162 self . record_late_bound_vars ( hir_id, binders) ;
11691163 let scope = Scope :: Binder {
0 commit comments