@@ -38,7 +38,7 @@ extern crate self as rustc_errors;
38
38
pub use codes:: * ;
39
39
pub use diagnostic:: {
40
40
AddToDiagnostic , BugAbort , DecorateLint , Diag , DiagArg , DiagArgMap , DiagArgName , DiagArgValue ,
41
- DiagInner , DiagStyledString , EmissionGuarantee , FatalAbort , IntoDiagArg , IntoDiagnostic ,
41
+ DiagInner , DiagStyledString , Diagnostic , EmissionGuarantee , FatalAbort , IntoDiagArg ,
42
42
StringPart , Subdiag , SubdiagMessageOp ,
43
43
} ;
44
44
pub use diagnostic_impls:: {
@@ -1134,12 +1134,12 @@ impl DiagCtxt {
1134
1134
}
1135
1135
1136
1136
#[ 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 )
1139
1139
}
1140
1140
1141
1141
#[ 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 > ) -> ! {
1143
1143
self . create_bug ( bug) . emit ( )
1144
1144
}
1145
1145
@@ -1174,29 +1174,26 @@ impl DiagCtxt {
1174
1174
#[ track_caller]
1175
1175
pub fn create_fatal < ' a > (
1176
1176
& ' a self ,
1177
- fatal : impl IntoDiagnostic < ' a , FatalAbort > ,
1177
+ fatal : impl Diagnostic < ' a , FatalAbort > ,
1178
1178
) -> Diag < ' a , FatalAbort > {
1179
- fatal. into_diagnostic ( self , Fatal )
1179
+ fatal. into_diag ( self , Fatal )
1180
1180
}
1181
1181
1182
1182
#[ 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 > ) -> ! {
1184
1184
self . create_fatal ( fatal) . emit ( )
1185
1185
}
1186
1186
1187
1187
#[ track_caller]
1188
1188
pub fn create_almost_fatal < ' a > (
1189
1189
& ' a self ,
1190
- fatal : impl IntoDiagnostic < ' a , FatalError > ,
1190
+ fatal : impl Diagnostic < ' a , FatalError > ,
1191
1191
) -> Diag < ' a , FatalError > {
1192
- fatal. into_diagnostic ( self , Fatal )
1192
+ fatal. into_diag ( self , Fatal )
1193
1193
}
1194
1194
1195
1195
#[ 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 {
1200
1197
self . create_almost_fatal ( fatal) . emit ( )
1201
1198
}
1202
1199
@@ -1234,12 +1231,12 @@ impl DiagCtxt {
1234
1231
}
1235
1232
1236
1233
#[ 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 )
1239
1236
}
1240
1237
1241
1238
#[ 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 {
1243
1240
self . create_err ( err) . emit ( )
1244
1241
}
1245
1242
@@ -1297,12 +1294,12 @@ impl DiagCtxt {
1297
1294
}
1298
1295
1299
1296
#[ 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 )
1302
1299
}
1303
1300
1304
1301
#[ 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 , ( ) > ) {
1306
1303
self . create_warn ( warning) . emit ( )
1307
1304
}
1308
1305
@@ -1335,12 +1332,12 @@ impl DiagCtxt {
1335
1332
}
1336
1333
1337
1334
#[ 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 )
1340
1337
}
1341
1338
1342
1339
#[ 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 , ( ) > ) {
1344
1341
self . create_note ( note) . emit ( )
1345
1342
}
1346
1343
0 commit comments