@@ -239,7 +239,7 @@ impl Subdiagnostic for RegionOriginNote<'_> {
239
239
fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
240
240
self ,
241
241
diag : & mut Diag < ' _ , G > ,
242
- _f : F ,
242
+ _f : & F ,
243
243
) {
244
244
let mut label_or_note = |span, msg : DiagMessage | {
245
245
let sub_count = diag. children . iter ( ) . filter ( |d| d. span . is_dummy ( ) ) . count ( ) ;
@@ -304,7 +304,7 @@ impl Subdiagnostic for LifetimeMismatchLabels {
304
304
fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
305
305
self ,
306
306
diag : & mut Diag < ' _ , G > ,
307
- _f : F ,
307
+ _f : & F ,
308
308
) {
309
309
match self {
310
310
LifetimeMismatchLabels :: InRet { param_span, ret_span, span, label_var1 } => {
@@ -352,7 +352,7 @@ impl Subdiagnostic for AddLifetimeParamsSuggestion<'_> {
352
352
fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
353
353
self ,
354
354
diag : & mut Diag < ' _ , G > ,
355
- _f : F ,
355
+ _f : & F ,
356
356
) {
357
357
let mut mk_suggestion = || {
358
358
let (
@@ -454,7 +454,7 @@ impl Subdiagnostic for IntroducesStaticBecauseUnmetLifetimeReq {
454
454
fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
455
455
mut self ,
456
456
diag : & mut Diag < ' _ , G > ,
457
- _f : F ,
457
+ _f : & F ,
458
458
) {
459
459
self . unmet_requirements
460
460
. push_span_label ( self . binding_span , fluent:: infer_msl_introduces_static) ;
@@ -773,7 +773,7 @@ impl Subdiagnostic for ConsiderBorrowingParamHelp {
773
773
fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
774
774
self ,
775
775
diag : & mut Diag < ' _ , G > ,
776
- f : F ,
776
+ f : & F ,
777
777
) {
778
778
let mut type_param_span: MultiSpan = self . spans . clone ( ) . into ( ) ;
779
779
for & span in & self . spans {
@@ -818,7 +818,7 @@ impl Subdiagnostic for DynTraitConstraintSuggestion {
818
818
fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
819
819
self ,
820
820
diag : & mut Diag < ' _ , G > ,
821
- f : F ,
821
+ f : & F ,
822
822
) {
823
823
let mut multi_span: MultiSpan = vec ! [ self . span] . into ( ) ;
824
824
multi_span. push_span_label ( self . span , fluent:: infer_dtcs_has_lifetime_req_label) ;
@@ -865,7 +865,7 @@ impl Subdiagnostic for ReqIntroducedLocations {
865
865
fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
866
866
mut self ,
867
867
diag : & mut Diag < ' _ , G > ,
868
- f : F ,
868
+ f : & F ,
869
869
) {
870
870
for sp in self . spans {
871
871
self . span . push_span_label ( sp, fluent:: infer_ril_introduced_here) ;
@@ -888,7 +888,7 @@ impl Subdiagnostic for MoreTargeted {
888
888
fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
889
889
self ,
890
890
diag : & mut Diag < ' _ , G > ,
891
- _f : F ,
891
+ _f : & F ,
892
892
) {
893
893
diag. code ( E0772 ) ;
894
894
diag. primary_message ( fluent:: infer_more_targeted) ;
@@ -1293,7 +1293,7 @@ impl Subdiagnostic for SuggestTuplePatternMany {
1293
1293
fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
1294
1294
self ,
1295
1295
diag : & mut Diag < ' _ , G > ,
1296
- f : F ,
1296
+ f : & F ,
1297
1297
) {
1298
1298
diag. arg ( "path" , self . path ) ;
1299
1299
let message = f ( diag, crate :: fluent_generated:: infer_stp_wrap_many. into ( ) ) ;
0 commit comments