@@ -61,7 +61,7 @@ mod snippet;
61
61
mod styled_buffer;
62
62
pub mod translation;
63
63
64
- pub use diagnostic_builder:: DiagnosticHandler ;
64
+ pub use diagnostic_builder:: IntoDiagnostic ;
65
65
pub use snippet:: Style ;
66
66
67
67
pub type PResult < ' a , T > = Result < T , DiagnosticBuilder < ' a , ErrorGuaranteed > > ;
@@ -1067,36 +1067,36 @@ impl Handler {
1067
1067
self . inner . borrow_mut ( ) . emit_diagnostic ( diagnostic)
1068
1068
}
1069
1069
1070
- pub fn emit_err < ' a > ( & ' a self , err : impl DiagnosticHandler < ' a > ) -> ErrorGuaranteed {
1070
+ pub fn emit_err < ' a > ( & ' a self , err : impl IntoDiagnostic < ' a > ) -> ErrorGuaranteed {
1071
1071
self . create_err ( err) . emit ( )
1072
1072
}
1073
1073
1074
1074
pub fn create_err < ' a > (
1075
1075
& ' a self ,
1076
- err : impl DiagnosticHandler < ' a > ,
1076
+ err : impl IntoDiagnostic < ' a > ,
1077
1077
) -> DiagnosticBuilder < ' a , ErrorGuaranteed > {
1078
1078
err. into_diagnostic ( self )
1079
1079
}
1080
1080
1081
1081
pub fn create_warning < ' a > (
1082
1082
& ' a self ,
1083
- warning : impl DiagnosticHandler < ' a , ( ) > ,
1083
+ warning : impl IntoDiagnostic < ' a , ( ) > ,
1084
1084
) -> DiagnosticBuilder < ' a , ( ) > {
1085
1085
warning. into_diagnostic ( self )
1086
1086
}
1087
1087
1088
- pub fn emit_warning < ' a > ( & ' a self , warning : impl DiagnosticHandler < ' a , ( ) > ) {
1088
+ pub fn emit_warning < ' a > ( & ' a self , warning : impl IntoDiagnostic < ' a , ( ) > ) {
1089
1089
self . create_warning ( warning) . emit ( )
1090
1090
}
1091
1091
1092
1092
pub fn create_fatal < ' a > (
1093
1093
& ' a self ,
1094
- fatal : impl DiagnosticHandler < ' a , !> ,
1094
+ fatal : impl IntoDiagnostic < ' a , !> ,
1095
1095
) -> DiagnosticBuilder < ' a , !> {
1096
1096
fatal. into_diagnostic ( self )
1097
1097
}
1098
1098
1099
- pub fn emit_fatal < ' a > ( & ' a self , fatal : impl DiagnosticHandler < ' a , !> ) -> ! {
1099
+ pub fn emit_fatal < ' a > ( & ' a self , fatal : impl IntoDiagnostic < ' a , !> ) -> ! {
1100
1100
self . create_fatal ( fatal) . emit ( )
1101
1101
}
1102
1102
0 commit comments