File tree 2 files changed +4
-3
lines changed
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> {
103
103
/// Buffers the diagnostic for later emission, unless handler
104
104
/// has disabled such buffering.
105
105
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
+ {
107
109
self . emit ( ) ;
108
110
return ;
109
111
}
Original file line number Diff line number Diff line change @@ -657,8 +657,7 @@ impl Handler {
657
657
1 => "aborting due to previous error" . to_string ( ) ,
658
658
_ => format ! ( "aborting due to {} previous errors" , self . err_count( ) )
659
659
} ;
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 ( ) {
662
661
return ;
663
662
}
664
663
You can’t perform that action at this time.
0 commit comments