@@ -620,7 +620,7 @@ fn gather_gat_bounds<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
620620 // In our example, requires that `Self: 'a`
621621 if ty_known_to_outlive ( tcx, item_def_id, param_env, wf_tys, * ty, * region_a) {
622622 debug ! ( ?ty_idx, ?region_a_idx) ;
623- debug ! ( "required clause: {ty} must outlive {}" , region_a . to_string ( ) ) ;
623+ debug ! ( "required clause: {ty} must outlive {region_a}" ) ;
624624 // Translate into the generic parameters of the GAT. In
625625 // our example, the type was `Self`, which will also be
626626 // `Self` in the GAT.
@@ -655,11 +655,7 @@ fn gather_gat_bounds<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
655655 }
656656 if region_known_to_outlive ( tcx, item_def_id, param_env, wf_tys, * region_a, * region_b) {
657657 debug ! ( ?region_a_idx, ?region_b_idx) ;
658- debug ! (
659- "required clause: {} must outlive {}" ,
660- region_a. to_string( ) ,
661- region_b. to_string( )
662- ) ;
658+ debug ! ( "required clause: {region_a} must outlive {region_b}" ) ;
663659 // Translate into the generic parameters of the GAT.
664660 let region_a_param = gat_generics. param_at ( * region_a_idx, tcx) ;
665661 let region_a_param = ty:: Region :: new_early_param (
@@ -2496,10 +2492,7 @@ fn lint_redundant_lifetimes<'tcx>(
24962492 rustc_lint_defs:: builtin:: REDUNDANT_LIFETIMES ,
24972493 tcx. local_def_id_to_hir_id ( def_id. expect_local ( ) ) ,
24982494 tcx. def_span ( def_id) ,
2499- RedundantLifetimeArgsLint {
2500- candidate : candidate. diag_arg ( ) ,
2501- victim : victim. diag_arg ( ) ,
2502- } ,
2495+ RedundantLifetimeArgsLint { candidate, victim } ,
25032496 ) ;
25042497 }
25052498 }
@@ -2511,7 +2504,7 @@ fn lint_redundant_lifetimes<'tcx>(
25112504#[ note( "you can use the `{$candidate}` lifetime directly, in place of `{$victim}`" ) ]
25122505struct RedundantLifetimeArgsLint < ' tcx > {
25132506 /// The lifetime we have found to be redundant.
2514- victim : ty:: RegionDiagArg < ' tcx > ,
2507+ victim : ty:: Region < ' tcx > ,
25152508 // The lifetime we can replace the victim with.
2516- candidate : ty:: RegionDiagArg < ' tcx > ,
2509+ candidate : ty:: Region < ' tcx > ,
25172510}
0 commit comments