@@ -278,7 +278,6 @@ struct HandlerInner {
278
278
err_count : usize ,
279
279
deduplicated_err_count : usize ,
280
280
emitter : Box < dyn Emitter + sync:: Send > ,
281
- continue_after_error : bool ,
282
281
delayed_span_bugs : Vec < Diagnostic > ,
283
282
284
283
/// This set contains the `DiagnosticId` of all emitted diagnostics to avoid
@@ -402,7 +401,6 @@ impl Handler {
402
401
err_count : 0 ,
403
402
deduplicated_err_count : 0 ,
404
403
emitter,
405
- continue_after_error : true ,
406
404
delayed_span_bugs : Vec :: new ( ) ,
407
405
taught_diagnostics : Default :: default ( ) ,
408
406
emitted_diagnostic_codes : Default :: default ( ) ,
@@ -412,10 +410,6 @@ impl Handler {
412
410
}
413
411
}
414
412
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
-
419
413
// This is here to not allow mutation of flags;
420
414
// as of this writing it's only used in tests in librustc.
421
415
pub fn can_emit_warnings ( & self ) -> bool {
@@ -672,10 +666,6 @@ impl Handler {
672
666
self . inner . borrow_mut ( ) . abort_if_errors ( )
673
667
}
674
668
675
- pub fn abort_if_errors_and_should_abort ( & self ) {
676
- self . inner . borrow_mut ( ) . abort_if_errors_and_should_abort ( )
677
- }
678
-
679
669
/// `true` if we haven't taught a diagnostic with this code already.
680
670
/// The caller must then teach the user about such a diagnostic.
681
671
///
@@ -696,7 +686,6 @@ impl Handler {
696
686
fn emit_diag_at_span ( & self , mut diag : Diagnostic , sp : impl Into < MultiSpan > ) {
697
687
let mut inner = self . inner . borrow_mut ( ) ;
698
688
inner. emit_diagnostic ( diag. set_span ( sp) ) ;
699
- inner. abort_if_errors_and_should_abort ( ) ;
700
689
}
701
690
702
691
pub fn emit_artifact_notification ( & self , path : & Path , artifact_type : & str ) {
@@ -830,14 +819,6 @@ impl HandlerInner {
830
819
self . has_errors ( ) || !self . delayed_span_bugs . is_empty ( )
831
820
}
832
821
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
-
841
822
fn abort_if_errors ( & mut self ) {
842
823
self . emit_stashed_diagnostics ( ) ;
843
824
@@ -853,7 +834,6 @@ impl HandlerInner {
853
834
854
835
fn emit_diag_at_span ( & mut self , mut diag : Diagnostic , sp : impl Into < MultiSpan > ) {
855
836
self . emit_diagnostic ( diag. set_span ( sp) ) ;
856
- self . abort_if_errors_and_should_abort ( ) ;
857
837
}
858
838
859
839
fn delay_span_bug ( & mut self , sp : impl Into < MultiSpan > , msg : & str ) {
0 commit comments