File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1013,7 +1013,9 @@ impl HandlerInner {
10131013 }
10141014
10151015 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 ( ) )
10171019 }
10181020
10191021 fn print_error_count ( & mut self , registry : & Registry ) {
@@ -1205,7 +1207,10 @@ impl HandlerInner {
12051207
12061208 fn panic_if_treat_err_as_bug ( & self ) {
12071209 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+ ) {
12091214 ( 1 , 1 ) => panic ! ( "aborting due to `-Z treat-err-as-bug=1`" ) ,
12101215 ( 0 , _) | ( 1 , _) => { }
12111216 ( count, as_bug) => panic ! (
You can’t perform that action at this time.
0 commit comments