@@ -38,7 +38,7 @@ extern crate self as rustc_errors;
3838pub use codes:: * ;
3939pub use diagnostic:: {
4040 AddToDiagnostic , BugAbort , DecorateLint , Diag , DiagArg , DiagArgMap , DiagArgName , DiagArgValue ,
41- DiagInner , DiagStyledString , EmissionGuarantee , FatalAbort , IntoDiagArg , IntoDiagnostic ,
41+ DiagInner , DiagStyledString , Diagnostic , EmissionGuarantee , FatalAbort , IntoDiagArg ,
4242 StringPart , Subdiag , SubdiagMessageOp ,
4343} ;
4444pub use diagnostic_impls:: {
@@ -1134,12 +1134,12 @@ impl DiagCtxt {
11341134 }
11351135
11361136 #[ track_caller]
1137- pub fn create_bug < ' a > ( & ' a self , bug : impl IntoDiagnostic < ' a , BugAbort > ) -> Diag < ' a , BugAbort > {
1138- bug. into_diagnostic ( self , Bug )
1137+ pub fn create_bug < ' a > ( & ' a self , bug : impl Diagnostic < ' a , BugAbort > ) -> Diag < ' a , BugAbort > {
1138+ bug. into_diag ( self , Bug )
11391139 }
11401140
11411141 #[ track_caller]
1142- pub fn emit_bug < ' a > ( & ' a self , bug : impl IntoDiagnostic < ' a , BugAbort > ) -> ! {
1142+ pub fn emit_bug < ' a > ( & ' a self , bug : impl Diagnostic < ' a , BugAbort > ) -> ! {
11431143 self . create_bug ( bug) . emit ( )
11441144 }
11451145
@@ -1174,29 +1174,26 @@ impl DiagCtxt {
11741174 #[ track_caller]
11751175 pub fn create_fatal < ' a > (
11761176 & ' a self ,
1177- fatal : impl IntoDiagnostic < ' a , FatalAbort > ,
1177+ fatal : impl Diagnostic < ' a , FatalAbort > ,
11781178 ) -> Diag < ' a , FatalAbort > {
1179- fatal. into_diagnostic ( self , Fatal )
1179+ fatal. into_diag ( self , Fatal )
11801180 }
11811181
11821182 #[ track_caller]
1183- pub fn emit_fatal < ' a > ( & ' a self , fatal : impl IntoDiagnostic < ' a , FatalAbort > ) -> ! {
1183+ pub fn emit_fatal < ' a > ( & ' a self , fatal : impl Diagnostic < ' a , FatalAbort > ) -> ! {
11841184 self . create_fatal ( fatal) . emit ( )
11851185 }
11861186
11871187 #[ track_caller]
11881188 pub fn create_almost_fatal < ' a > (
11891189 & ' a self ,
1190- fatal : impl IntoDiagnostic < ' a , FatalError > ,
1190+ fatal : impl Diagnostic < ' a , FatalError > ,
11911191 ) -> Diag < ' a , FatalError > {
1192- fatal. into_diagnostic ( self , Fatal )
1192+ fatal. into_diag ( self , Fatal )
11931193 }
11941194
11951195 #[ track_caller]
1196- pub fn emit_almost_fatal < ' a > (
1197- & ' a self ,
1198- fatal : impl IntoDiagnostic < ' a , FatalError > ,
1199- ) -> FatalError {
1196+ pub fn emit_almost_fatal < ' a > ( & ' a self , fatal : impl Diagnostic < ' a , FatalError > ) -> FatalError {
12001197 self . create_almost_fatal ( fatal) . emit ( )
12011198 }
12021199
@@ -1234,12 +1231,12 @@ impl DiagCtxt {
12341231 }
12351232
12361233 #[ track_caller]
1237- pub fn create_err < ' a > ( & ' a self , err : impl IntoDiagnostic < ' a > ) -> Diag < ' a > {
1238- err. into_diagnostic ( self , Error )
1234+ pub fn create_err < ' a > ( & ' a self , err : impl Diagnostic < ' a > ) -> Diag < ' a > {
1235+ err. into_diag ( self , Error )
12391236 }
12401237
12411238 #[ track_caller]
1242- pub fn emit_err < ' a > ( & ' a self , err : impl IntoDiagnostic < ' a > ) -> ErrorGuaranteed {
1239+ pub fn emit_err < ' a > ( & ' a self , err : impl Diagnostic < ' a > ) -> ErrorGuaranteed {
12431240 self . create_err ( err) . emit ( )
12441241 }
12451242
@@ -1297,12 +1294,12 @@ impl DiagCtxt {
12971294 }
12981295
12991296 #[ track_caller]
1300- pub fn create_warn < ' a > ( & ' a self , warning : impl IntoDiagnostic < ' a , ( ) > ) -> Diag < ' a , ( ) > {
1301- warning. into_diagnostic ( self , Warning )
1297+ pub fn create_warn < ' a > ( & ' a self , warning : impl Diagnostic < ' a , ( ) > ) -> Diag < ' a , ( ) > {
1298+ warning. into_diag ( self , Warning )
13021299 }
13031300
13041301 #[ track_caller]
1305- pub fn emit_warn < ' a > ( & ' a self , warning : impl IntoDiagnostic < ' a , ( ) > ) {
1302+ pub fn emit_warn < ' a > ( & ' a self , warning : impl Diagnostic < ' a , ( ) > ) {
13061303 self . create_warn ( warning) . emit ( )
13071304 }
13081305
@@ -1335,12 +1332,12 @@ impl DiagCtxt {
13351332 }
13361333
13371334 #[ track_caller]
1338- pub fn create_note < ' a > ( & ' a self , note : impl IntoDiagnostic < ' a , ( ) > ) -> Diag < ' a , ( ) > {
1339- note. into_diagnostic ( self , Note )
1335+ pub fn create_note < ' a > ( & ' a self , note : impl Diagnostic < ' a , ( ) > ) -> Diag < ' a , ( ) > {
1336+ note. into_diag ( self , Note )
13401337 }
13411338
13421339 #[ track_caller]
1343- pub fn emit_note < ' a > ( & ' a self , note : impl IntoDiagnostic < ' a , ( ) > ) {
1340+ pub fn emit_note < ' a > ( & ' a self , note : impl Diagnostic < ' a , ( ) > ) {
13441341 self . create_note ( note) . emit ( )
13451342 }
13461343
0 commit comments