@@ -279,19 +279,13 @@ fn resolve_bound_vars(tcx: TyCtxt<'_>, local_def_id: hir::OwnerId) -> ResolveBou
279279 rbv
280280}
281281
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 {
286283 let def_id = param. def_id . to_def_id ( ) ;
287- let name = tcx. item_name ( def_id) ;
288284 match param. kind {
289285 GenericParamKind :: Lifetime { .. } => {
290286 ty:: BoundVariableKind :: Region ( ty:: BoundRegionKind :: Named ( def_id) )
291287 }
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) ) ,
295289 GenericParamKind :: Const { .. } => ty:: BoundVariableKind :: Const ,
296290 }
297291}
@@ -305,7 +299,7 @@ fn generic_param_def_as_bound_arg(param: &ty::GenericParamDef) -> ty::BoundVaria
305299 ty:: BoundVariableKind :: Region ( ty:: BoundRegionKind :: Named ( param. def_id ) )
306300 }
307301 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 ) )
309303 }
310304 ty:: GenericParamDefKind :: Const { .. } => ty:: BoundVariableKind :: Const ,
311305 }
@@ -386,7 +380,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
386380 trait_ref. bound_generic_params . iter ( ) . enumerate ( ) . map ( |( late_bound_idx, param) | {
387381 let arg = ResolvedArg :: late ( initial_bound_vars + late_bound_idx as u32 , param) ;
388382 bound_vars. insert ( param. def_id , arg) ;
389- late_arg_as_bound_arg ( self . tcx , param)
383+ late_arg_as_bound_arg ( param)
390384 } ) ;
391385 binders. extend ( binders_iter) ;
392386
@@ -485,7 +479,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
485479 . map ( |( late_bound_idx, param) | {
486480 (
487481 ( 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) ,
489483 )
490484 } )
491485 . unzip ( ) ;
@@ -718,7 +712,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
718712 . map ( |( late_bound_idx, param) | {
719713 (
720714 ( 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) ,
722716 )
723717 } )
724718 . unzip ( ) ;
@@ -748,7 +742,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
748742 . map ( |( late_bound_idx, param) | {
749743 (
750744 ( 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) ,
752746 )
753747 } )
754748 . unzip ( ) ;
@@ -957,7 +951,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
957951 . map ( |( late_bound_idx, param) | {
958952 (
959953 ( 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) ,
961955 )
962956 } )
963957 . unzip ( ) ;
@@ -1171,7 +1165,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
11711165 matches ! ( param. kind, GenericParamKind :: Lifetime { .. } )
11721166 && self . tcx . is_late_bound ( param. hir_id )
11731167 } )
1174- . map ( |param| late_arg_as_bound_arg ( self . tcx , param) )
1168+ . map ( |param| late_arg_as_bound_arg ( param) )
11751169 . collect ( ) ;
11761170 self . record_late_bound_vars ( hir_id, binders) ;
11771171 let scope = Scope :: Binder {
0 commit comments