File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ impl<'a> DiagnosticBuilder<'a> {
103103 /// Buffers the diagnostic for later emission, unless handler
104104 /// has disabled such buffering.
105105 pub fn buffer ( mut self , buffered_diagnostics : & mut Vec < Diagnostic > ) {
106- if self . handler . flags . dont_buffer_diagnostics || self . handler . treat_err_as_bug ( ) {
106+ if self . handler . flags . dont_buffer_diagnostics ||
107+ self . handler . flags . treat_err_as_bug . is_some ( )
108+ {
107109 self . emit ( ) ;
108110 return ;
109111 }
Original file line number Diff line number Diff line change @@ -657,8 +657,7 @@ impl Handler {
657657 1 => "aborting due to previous error" . to_string ( ) ,
658658 _ => format ! ( "aborting due to {} previous errors" , self . err_count( ) )
659659 } ;
660- let err_as_bug = self . flags . treat_err_as_bug . unwrap_or ( 0 ) ;
661- if self . err_count ( ) >= err_as_bug {
660+ if self . treat_err_as_bug ( ) {
662661 return ;
663662 }
664663
You can’t perform that action at this time.
0 commit comments