@@ -110,14 +110,14 @@ fn push_debuginfo_type_name<'tcx>(
110110 ty_and_layout,
111111 & |output, visited| {
112112 push_item_name ( tcx, def. did ( ) , true , output) ;
113- push_generic_params_internal ( tcx, args, def . did ( ) , output, visited) ;
113+ push_generic_params_internal ( tcx, args, output, visited) ;
114114 } ,
115115 output,
116116 visited,
117117 ) ;
118118 } else {
119119 push_item_name ( tcx, def. did ( ) , qualified, output) ;
120- push_generic_params_internal ( tcx, args, def . did ( ) , output, visited) ;
120+ push_generic_params_internal ( tcx, args, output, visited) ;
121121 }
122122 }
123123 ty:: Tuple ( component_types) => {
@@ -251,13 +251,8 @@ fn push_debuginfo_type_name<'tcx>(
251251 let principal =
252252 tcx. normalize_erasing_late_bound_regions ( ty:: ParamEnv :: reveal_all ( ) , principal) ;
253253 push_item_name ( tcx, principal. def_id , qualified, output) ;
254- let principal_has_generic_params = push_generic_params_internal (
255- tcx,
256- principal. args ,
257- principal. def_id ,
258- output,
259- visited,
260- ) ;
254+ let principal_has_generic_params =
255+ push_generic_params_internal ( tcx, principal. args , output, visited) ;
261256
262257 let projection_bounds: SmallVec < [ _ ; 4 ] > = trait_data
263258 . projection_bounds ( )
@@ -538,13 +533,7 @@ pub fn compute_debuginfo_vtable_name<'tcx>(
538533 tcx. normalize_erasing_late_bound_regions ( ty:: ParamEnv :: reveal_all ( ) , trait_ref) ;
539534 push_item_name ( tcx, trait_ref. def_id , true , & mut vtable_name) ;
540535 visited. clear ( ) ;
541- push_generic_params_internal (
542- tcx,
543- trait_ref. args ,
544- trait_ref. def_id ,
545- & mut vtable_name,
546- & mut visited,
547- ) ;
536+ push_generic_params_internal ( tcx, trait_ref. args , & mut vtable_name, & mut visited) ;
548537 } else {
549538 vtable_name. push ( '_' ) ;
550539 }
@@ -647,12 +636,11 @@ fn push_unqualified_item_name(
647636fn push_generic_params_internal < ' tcx > (
648637 tcx : TyCtxt < ' tcx > ,
649638 args : GenericArgsRef < ' tcx > ,
650- def_id : DefId ,
651639 output : & mut String ,
652640 visited : & mut FxHashSet < Ty < ' tcx > > ,
653641) -> bool {
654642 assert_eq ! ( args, tcx. normalize_erasing_regions( ty:: ParamEnv :: reveal_all( ) , args) ) ;
655- let mut args = args. non_erasable_generics ( tcx , def_id ) . peekable ( ) ;
643+ let mut args = args. non_erasable_generics ( ) . peekable ( ) ;
656644 if args. peek ( ) . is_none ( ) {
657645 return false ;
658646 }
@@ -736,12 +724,11 @@ fn push_const_param<'tcx>(tcx: TyCtxt<'tcx>, ct: ty::Const<'tcx>, output: &mut S
736724pub fn push_generic_params < ' tcx > (
737725 tcx : TyCtxt < ' tcx > ,
738726 args : GenericArgsRef < ' tcx > ,
739- def_id : DefId ,
740727 output : & mut String ,
741728) {
742729 let _prof = tcx. prof . generic_activity ( "compute_debuginfo_type_name" ) ;
743730 let mut visited = FxHashSet :: default ( ) ;
744- push_generic_params_internal ( tcx, args, def_id , output, & mut visited) ;
731+ push_generic_params_internal ( tcx, args, output, & mut visited) ;
745732}
746733
747734fn push_closure_or_coroutine_name < ' tcx > (
@@ -786,7 +773,7 @@ fn push_closure_or_coroutine_name<'tcx>(
786773 // FIXME(async_closures): This is probably not going to be correct w.r.t.
787774 // multiple coroutine flavors. Maybe truncate to (parent + 1)?
788775 let args = args. truncate_to ( tcx, generics) ;
789- push_generic_params_internal ( tcx, args, enclosing_fn_def_id , output, visited) ;
776+ push_generic_params_internal ( tcx, args, output, visited) ;
790777}
791778
792779fn push_close_angle_bracket ( cpp_like_debuginfo : bool , output : & mut String ) {
0 commit comments