@@ -12,7 +12,7 @@ extern crate rustc_session;
1212extern crate rustc_span;
1313
1414use rustc_errors:: {
15- AddSubdiagnostic , IntoDiagnostic , Diagnostic , DiagnosticBuilder ,
15+ AddToDiagnostic , IntoDiagnostic , Diagnostic , DiagnosticBuilder ,
1616 ErrorGuaranteed , Handler , fluent
1717} ;
1818use rustc_macros:: { DiagnosticHandler , SessionSubdiagnostic } ;
@@ -49,29 +49,29 @@ impl<'a> IntoDiagnostic<'a, ErrorGuaranteed> for TranslatableInSessionDiagnostic
4949 }
5050}
5151
52- pub struct UntranslatableInAddSubdiagnostic ;
52+ pub struct UntranslatableInAddToDiagnostic ;
5353
54- impl AddSubdiagnostic for UntranslatableInAddSubdiagnostic {
54+ impl AddToDiagnostic for UntranslatableInAddToDiagnostic {
5555 fn add_to_diagnostic ( self , diag : & mut Diagnostic ) {
5656 diag. note ( "untranslatable diagnostic" ) ;
5757 //~^ ERROR diagnostics should be created using translatable messages
5858 }
5959}
6060
61- pub struct TranslatableInAddSubdiagnostic ;
61+ pub struct TranslatableInAddToDiagnostic ;
6262
63- impl AddSubdiagnostic for TranslatableInAddSubdiagnostic {
63+ impl AddToDiagnostic for TranslatableInAddToDiagnostic {
6464 fn add_to_diagnostic ( self , diag : & mut Diagnostic ) {
6565 diag. note ( fluent:: typeck:: note) ;
6666 }
6767}
6868
6969pub fn make_diagnostics < ' a > ( handler : & ' a Handler ) {
7070 let _diag = handler. struct_err ( fluent:: parser:: expect_path) ;
71- //~^ ERROR diagnostics should only be created in `IntoDiagnostic`/`AddSubdiagnostic ` impls
71+ //~^ ERROR diagnostics should only be created in `IntoDiagnostic`/`AddToDiagnostic ` impls
7272
7373 let _diag = handler. struct_err ( "untranslatable diagnostic" ) ;
74- //~^ ERROR diagnostics should only be created in `IntoDiagnostic`/`AddSubdiagnostic ` impls
74+ //~^ ERROR diagnostics should only be created in `IntoDiagnostic`/`AddToDiagnostic ` impls
7575 //~^^ ERROR diagnostics should be created using translatable messages
7676}
7777
0 commit comments