@@ -278,19 +278,13 @@ fn resolve_bound_vars(tcx: TyCtxt<'_>, local_def_id: hir::OwnerId) -> ResolveBou
278278 rbv
279279}
280280
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 {
285282 let def_id = param. def_id . to_def_id ( ) ;
286- let name = tcx. item_name ( def_id) ;
287283 match param. kind {
288284 GenericParamKind :: Lifetime { .. } => {
289285 ty:: BoundVariableKind :: Region ( ty:: BoundRegionKind :: Named ( def_id) )
290286 }
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) ) ,
294288 GenericParamKind :: Const { .. } => ty:: BoundVariableKind :: Const ,
295289 }
296290}
@@ -304,7 +298,7 @@ fn generic_param_def_as_bound_arg(param: &ty::GenericParamDef) -> ty::BoundVaria
304298 ty:: BoundVariableKind :: Region ( ty:: BoundRegionKind :: Named ( param. def_id ) )
305299 }
306300 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 ) )
308302 }
309303 ty:: GenericParamDefKind :: Const { .. } => ty:: BoundVariableKind :: Const ,
310304 }
@@ -385,7 +379,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
385379 trait_ref. bound_generic_params . iter ( ) . enumerate ( ) . map ( |( late_bound_idx, param) | {
386380 let arg = ResolvedArg :: late ( initial_bound_vars + late_bound_idx as u32 , param) ;
387381 bound_vars. insert ( param. def_id , arg) ;
388- late_arg_as_bound_arg ( self . tcx , param)
382+ late_arg_as_bound_arg ( param)
389383 } ) ;
390384 binders. extend ( binders_iter) ;
391385
@@ -484,7 +478,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
484478 . map ( |( late_bound_idx, param) | {
485479 (
486480 ( 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) ,
488482 )
489483 } )
490484 . unzip ( ) ;
@@ -717,7 +711,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
717711 . map ( |( late_bound_idx, param) | {
718712 (
719713 ( 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) ,
721715 )
722716 } )
723717 . unzip ( ) ;
@@ -747,7 +741,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
747741 . map ( |( late_bound_idx, param) | {
748742 (
749743 ( 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) ,
751745 )
752746 } )
753747 . unzip ( ) ;
@@ -956,7 +950,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
956950 . map ( |( late_bound_idx, param) | {
957951 (
958952 ( 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) ,
960954 )
961955 } )
962956 . unzip ( ) ;
@@ -1170,7 +1164,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
11701164 matches ! ( param. kind, GenericParamKind :: Lifetime { .. } )
11711165 && self . tcx . is_late_bound ( param. hir_id )
11721166 } )
1173- . map ( |param| late_arg_as_bound_arg ( self . tcx , param) )
1167+ . map ( |param| late_arg_as_bound_arg ( param) )
11741168 . collect ( ) ;
11751169 self . record_late_bound_vars ( hir_id, binders) ;
11761170 let scope = Scope :: Binder {
0 commit comments