File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -1168,7 +1168,8 @@ impl DiagCtxt {
11681168 let mut inner = self . inner . borrow_mut ( ) ;
11691169
11701170 if loud && lint_level. is_error ( ) {
1171- inner. bump_err_count ( ) ;
1171+ inner. err_count += 1 ;
1172+ inner. panic_if_treat_err_as_bug ( ) ;
11721173 }
11731174
11741175 inner. emitter . emit_unused_externs ( lint_level, unused_externs)
@@ -1353,10 +1354,11 @@ impl DiagCtxtInner {
13531354 }
13541355 if diagnostic. is_error ( ) {
13551356 if diagnostic. is_lint {
1356- self . bump_lint_err_count ( ) ;
1357+ self . lint_err_count += 1 ;
13571358 } else {
1358- self . bump_err_count ( ) ;
1359+ self . err_count += 1 ;
13591360 }
1361+ self . panic_if_treat_err_as_bug ( ) ;
13601362
13611363 #[ allow( deprecated) ]
13621364 {
@@ -1447,16 +1449,6 @@ impl DiagCtxtInner {
14471449 panic:: panic_any ( DelayedBugPanic ) ;
14481450 }
14491451
1450- fn bump_lint_err_count ( & mut self ) {
1451- self . lint_err_count += 1 ;
1452- self . panic_if_treat_err_as_bug ( ) ;
1453- }
1454-
1455- fn bump_err_count ( & mut self ) {
1456- self . err_count += 1 ;
1457- self . panic_if_treat_err_as_bug ( ) ;
1458- }
1459-
14601452 fn panic_if_treat_err_as_bug ( & self ) {
14611453 if self . treat_err_as_bug ( ) {
14621454 match (
You can’t perform that action at this time.
0 commit comments