@@ -278,7 +278,6 @@ struct HandlerInner {
278278 err_count : usize ,
279279 deduplicated_err_count : usize ,
280280 emitter : Box < dyn Emitter + sync:: Send > ,
281- continue_after_error : bool ,
282281 delayed_span_bugs : Vec < Diagnostic > ,
283282
284283 /// This set contains the `DiagnosticId` of all emitted diagnostics to avoid
@@ -402,7 +401,6 @@ impl Handler {
402401 err_count : 0 ,
403402 deduplicated_err_count : 0 ,
404403 emitter,
405- continue_after_error : true ,
406404 delayed_span_bugs : Vec :: new ( ) ,
407405 taught_diagnostics : Default :: default ( ) ,
408406 emitted_diagnostic_codes : Default :: default ( ) ,
@@ -412,10 +410,6 @@ impl Handler {
412410 }
413411 }
414412
415- pub fn set_continue_after_error ( & self , continue_after_error : bool ) {
416- self . inner . borrow_mut ( ) . continue_after_error = continue_after_error;
417- }
418-
419413 // This is here to not allow mutation of flags;
420414 // as of this writing it's only used in tests in librustc.
421415 pub fn can_emit_warnings ( & self ) -> bool {
@@ -672,10 +666,6 @@ impl Handler {
672666 self . inner . borrow_mut ( ) . abort_if_errors ( )
673667 }
674668
675- pub fn abort_if_errors_and_should_abort ( & self ) {
676- self . inner . borrow_mut ( ) . abort_if_errors_and_should_abort ( )
677- }
678-
679669 /// `true` if we haven't taught a diagnostic with this code already.
680670 /// The caller must then teach the user about such a diagnostic.
681671 ///
@@ -696,7 +686,6 @@ impl Handler {
696686 fn emit_diag_at_span ( & self , mut diag : Diagnostic , sp : impl Into < MultiSpan > ) {
697687 let mut inner = self . inner . borrow_mut ( ) ;
698688 inner. emit_diagnostic ( diag. set_span ( sp) ) ;
699- inner. abort_if_errors_and_should_abort ( ) ;
700689 }
701690
702691 pub fn emit_artifact_notification ( & self , path : & Path , artifact_type : & str ) {
@@ -830,14 +819,6 @@ impl HandlerInner {
830819 self . has_errors ( ) || !self . delayed_span_bugs . is_empty ( )
831820 }
832821
833- fn abort_if_errors_and_should_abort ( & mut self ) {
834- self . emit_stashed_diagnostics ( ) ;
835-
836- if self . has_errors ( ) && !self . continue_after_error {
837- FatalError . raise ( ) ;
838- }
839- }
840-
841822 fn abort_if_errors ( & mut self ) {
842823 self . emit_stashed_diagnostics ( ) ;
843824
@@ -853,7 +834,6 @@ impl HandlerInner {
853834
854835 fn emit_diag_at_span ( & mut self , mut diag : Diagnostic , sp : impl Into < MultiSpan > ) {
855836 self . emit_diagnostic ( diag. set_span ( sp) ) ;
856- self . abort_if_errors_and_should_abort ( ) ;
857837 }
858838
859839 fn delay_span_bug ( & mut self , sp : impl Into < MultiSpan > , msg : & str ) {
0 commit comments