1
1
use hir:: GenericParamKind ;
2
2
use rustc_errors:: {
3
- codes:: * , AddToDiagnostic , Applicability , Diag , DiagMessage , DiagStyledString ,
4
- EmissionGuarantee , IntoDiagArg , MultiSpan , SubdiagMessageOp ,
3
+ codes:: * , Applicability , Diag , DiagMessage , DiagStyledString , EmissionGuarantee , IntoDiagArg ,
4
+ MultiSpan , SubdiagMessageOp , Subdiagnostic ,
5
5
} ;
6
6
use rustc_hir as hir;
7
7
use rustc_hir:: FnRetTy ;
@@ -224,8 +224,8 @@ pub enum RegionOriginNote<'a> {
224
224
} ,
225
225
}
226
226
227
- impl AddToDiagnostic for RegionOriginNote < ' _ > {
228
- fn add_to_diagnostic_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
227
+ impl Subdiagnostic for RegionOriginNote < ' _ > {
228
+ fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
229
229
self ,
230
230
diag : & mut Diag < ' _ , G > ,
231
231
_f : F ,
@@ -289,8 +289,8 @@ pub enum LifetimeMismatchLabels {
289
289
} ,
290
290
}
291
291
292
- impl AddToDiagnostic for LifetimeMismatchLabels {
293
- fn add_to_diagnostic_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
292
+ impl Subdiagnostic for LifetimeMismatchLabels {
293
+ fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
294
294
self ,
295
295
diag : & mut Diag < ' _ , G > ,
296
296
_f : F ,
@@ -337,8 +337,8 @@ pub struct AddLifetimeParamsSuggestion<'a> {
337
337
pub add_note : bool ,
338
338
}
339
339
340
- impl AddToDiagnostic for AddLifetimeParamsSuggestion < ' _ > {
341
- fn add_to_diagnostic_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
340
+ impl Subdiagnostic for AddLifetimeParamsSuggestion < ' _ > {
341
+ fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
342
342
self ,
343
343
diag : & mut Diag < ' _ , G > ,
344
344
_f : F ,
@@ -439,8 +439,8 @@ pub struct IntroducesStaticBecauseUnmetLifetimeReq {
439
439
pub binding_span : Span ,
440
440
}
441
441
442
- impl AddToDiagnostic for IntroducesStaticBecauseUnmetLifetimeReq {
443
- fn add_to_diagnostic_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
442
+ impl Subdiagnostic for IntroducesStaticBecauseUnmetLifetimeReq {
443
+ fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
444
444
mut self ,
445
445
diag : & mut Diag < ' _ , G > ,
446
446
_f : F ,
@@ -758,8 +758,8 @@ pub struct ConsiderBorrowingParamHelp {
758
758
pub spans : Vec < Span > ,
759
759
}
760
760
761
- impl AddToDiagnostic for ConsiderBorrowingParamHelp {
762
- fn add_to_diagnostic_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
761
+ impl Subdiagnostic for ConsiderBorrowingParamHelp {
762
+ fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
763
763
self ,
764
764
diag : & mut Diag < ' _ , G > ,
765
765
f : F ,
@@ -803,8 +803,8 @@ pub struct DynTraitConstraintSuggestion {
803
803
pub ident : Ident ,
804
804
}
805
805
806
- impl AddToDiagnostic for DynTraitConstraintSuggestion {
807
- fn add_to_diagnostic_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
806
+ impl Subdiagnostic for DynTraitConstraintSuggestion {
807
+ fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
808
808
self ,
809
809
diag : & mut Diag < ' _ , G > ,
810
810
f : F ,
@@ -850,8 +850,8 @@ pub struct ReqIntroducedLocations {
850
850
pub add_label : bool ,
851
851
}
852
852
853
- impl AddToDiagnostic for ReqIntroducedLocations {
854
- fn add_to_diagnostic_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
853
+ impl Subdiagnostic for ReqIntroducedLocations {
854
+ fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
855
855
mut self ,
856
856
diag : & mut Diag < ' _ , G > ,
857
857
f : F ,
@@ -873,8 +873,8 @@ pub struct MoreTargeted {
873
873
pub ident : Symbol ,
874
874
}
875
875
876
- impl AddToDiagnostic for MoreTargeted {
877
- fn add_to_diagnostic_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
876
+ impl Subdiagnostic for MoreTargeted {
877
+ fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
878
878
self ,
879
879
diag : & mut Diag < ' _ , G > ,
880
880
_f : F ,
@@ -1296,8 +1296,8 @@ pub struct SuggestTuplePatternMany {
1296
1296
pub compatible_variants : Vec < String > ,
1297
1297
}
1298
1298
1299
- impl AddToDiagnostic for SuggestTuplePatternMany {
1300
- fn add_to_diagnostic_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
1299
+ impl Subdiagnostic for SuggestTuplePatternMany {
1300
+ fn add_to_diag_with < G : EmissionGuarantee , F : SubdiagMessageOp < G > > (
1301
1301
self ,
1302
1302
diag : & mut Diag < ' _ , G > ,
1303
1303
f : F ,
0 commit comments