@@ -239,7 +239,7 @@ impl Subdiagnostic for RegionOriginNote<'_> {
239239 fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
240240 self ,
241241 diag : & mut Diag < ' _ , G > ,
242- _f : F ,
242+ _f : & F ,
243243 ) {
244244 let mut label_or_note = |span, msg : DiagMessage | {
245245 let sub_count = diag. children . iter ( ) . filter ( |d| d. span . is_dummy ( ) ) . count ( ) ;
@@ -304,7 +304,7 @@ impl Subdiagnostic for LifetimeMismatchLabels {
304304 fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
305305 self ,
306306 diag : & mut Diag < ' _ , G > ,
307- _f : F ,
307+ _f : & F ,
308308 ) {
309309 match self {
310310 LifetimeMismatchLabels :: InRet { param_span, ret_span, span, label_var1 } => {
@@ -352,7 +352,7 @@ impl Subdiagnostic for AddLifetimeParamsSuggestion<'_> {
352352 fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
353353 self ,
354354 diag : & mut Diag < ' _ , G > ,
355- _f : F ,
355+ _f : & F ,
356356 ) {
357357 let mut mk_suggestion = || {
358358 let (
@@ -454,7 +454,7 @@ impl Subdiagnostic for IntroducesStaticBecauseUnmetLifetimeReq {
454454 fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
455455 mut self ,
456456 diag : & mut Diag < ' _ , G > ,
457- _f : F ,
457+ _f : & F ,
458458 ) {
459459 self . unmet_requirements
460460 . push_span_label ( self . binding_span , fluent:: infer_msl_introduces_static) ;
@@ -773,7 +773,7 @@ impl Subdiagnostic for ConsiderBorrowingParamHelp {
773773 fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
774774 self ,
775775 diag : & mut Diag < ' _ , G > ,
776- f : F ,
776+ f : & F ,
777777 ) {
778778 let mut type_param_span: MultiSpan = self . spans . clone ( ) . into ( ) ;
779779 for & span in & self . spans {
@@ -818,7 +818,7 @@ impl Subdiagnostic for DynTraitConstraintSuggestion {
818818 fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
819819 self ,
820820 diag : & mut Diag < ' _ , G > ,
821- f : F ,
821+ f : & F ,
822822 ) {
823823 let mut multi_span: MultiSpan = vec ! [ self . span] . into ( ) ;
824824 multi_span. push_span_label ( self . span , fluent:: infer_dtcs_has_lifetime_req_label) ;
@@ -865,7 +865,7 @@ impl Subdiagnostic for ReqIntroducedLocations {
865865 fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
866866 mut self ,
867867 diag : & mut Diag < ' _ , G > ,
868- f : F ,
868+ f : & F ,
869869 ) {
870870 for sp in self . spans {
871871 self . span . push_span_label ( sp, fluent:: infer_ril_introduced_here) ;
@@ -888,7 +888,7 @@ impl Subdiagnostic for MoreTargeted {
888888 fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
889889 self ,
890890 diag : & mut Diag < ' _ , G > ,
891- _f : F ,
891+ _f : & F ,
892892 ) {
893893 diag. code ( E0772 ) ;
894894 diag. primary_message ( fluent:: infer_more_targeted) ;
@@ -1293,7 +1293,7 @@ impl Subdiagnostic for SuggestTuplePatternMany {
12931293 fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
12941294 self ,
12951295 diag : & mut Diag < ' _ , G > ,
1296- f : F ,
1296+ f : & F ,
12971297 ) {
12981298 diag. arg ( "path" , self . path ) ;
12991299 let message = f ( diag, crate :: fluent_generated:: infer_stp_wrap_many. into ( ) ) ;
0 commit comments