@@ -61,7 +61,7 @@ mod snippet;
6161mod styled_buffer;
6262pub mod translation;
6363
64- pub use diagnostic_builder:: DiagnosticHandler ;
64+ pub use diagnostic_builder:: IntoDiagnostic ;
6565pub use snippet:: Style ;
6666
6767pub type PResult < ' a , T > = Result < T , DiagnosticBuilder < ' a , ErrorGuaranteed > > ;
@@ -1067,36 +1067,36 @@ impl Handler {
10671067 self . inner . borrow_mut ( ) . emit_diagnostic ( diagnostic)
10681068 }
10691069
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 {
10711071 self . create_err ( err) . emit ( )
10721072 }
10731073
10741074 pub fn create_err < ' a > (
10751075 & ' a self ,
1076- err : impl DiagnosticHandler < ' a > ,
1076+ err : impl IntoDiagnostic < ' a > ,
10771077 ) -> DiagnosticBuilder < ' a , ErrorGuaranteed > {
10781078 err. into_diagnostic ( self )
10791079 }
10801080
10811081 pub fn create_warning < ' a > (
10821082 & ' a self ,
1083- warning : impl DiagnosticHandler < ' a , ( ) > ,
1083+ warning : impl IntoDiagnostic < ' a , ( ) > ,
10841084 ) -> DiagnosticBuilder < ' a , ( ) > {
10851085 warning. into_diagnostic ( self )
10861086 }
10871087
1088- pub fn emit_warning < ' a > ( & ' a self , warning : impl DiagnosticHandler < ' a , ( ) > ) {
1088+ pub fn emit_warning < ' a > ( & ' a self , warning : impl IntoDiagnostic < ' a , ( ) > ) {
10891089 self . create_warning ( warning) . emit ( )
10901090 }
10911091
10921092 pub fn create_fatal < ' a > (
10931093 & ' a self ,
1094- fatal : impl DiagnosticHandler < ' a , !> ,
1094+ fatal : impl IntoDiagnostic < ' a , !> ,
10951095 ) -> DiagnosticBuilder < ' a , !> {
10961096 fatal. into_diagnostic ( self )
10971097 }
10981098
1099- pub fn emit_fatal < ' a > ( & ' a self , fatal : impl DiagnosticHandler < ' a , !> ) -> ! {
1099+ pub fn emit_fatal < ' a > ( & ' a self , fatal : impl IntoDiagnostic < ' a , !> ) -> ! {
11001100 self . create_fatal ( fatal) . emit ( )
11011101 }
11021102
0 commit comments