File tree 1 file changed +7
-2
lines changed
compiler/rustc_errors/src
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1013,7 +1013,9 @@ impl HandlerInner {
1013
1013
}
1014
1014
1015
1015
fn treat_err_as_bug ( & self ) -> bool {
1016
- self . flags . treat_err_as_bug . map_or ( false , |c| self . err_count ( ) >= c. get ( ) )
1016
+ self . flags
1017
+ . treat_err_as_bug
1018
+ . map_or ( false , |c| self . err_count ( ) + self . lint_err_count >= c. get ( ) )
1017
1019
}
1018
1020
1019
1021
fn print_error_count ( & mut self , registry : & Registry ) {
@@ -1205,7 +1207,10 @@ impl HandlerInner {
1205
1207
1206
1208
fn panic_if_treat_err_as_bug ( & self ) {
1207
1209
if self . treat_err_as_bug ( ) {
1208
- match ( self . err_count ( ) , self . flags . treat_err_as_bug . map ( |c| c. get ( ) ) . unwrap_or ( 0 ) ) {
1210
+ match (
1211
+ self . err_count ( ) + self . lint_err_count ,
1212
+ self . flags . treat_err_as_bug . map ( |c| c. get ( ) ) . unwrap_or ( 0 ) ,
1213
+ ) {
1209
1214
( 1 , 1 ) => panic ! ( "aborting due to `-Z treat-err-as-bug=1`" ) ,
1210
1215
( 0 , _) | ( 1 , _) => { }
1211
1216
( count, as_bug) => panic ! (
You can’t perform that action at this time.
0 commit comments