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 {
1168
1168
let mut inner = self . inner . borrow_mut ( ) ;
1169
1169
1170
1170
if loud && lint_level. is_error ( ) {
1171
- inner. bump_err_count ( ) ;
1171
+ inner. err_count += 1 ;
1172
+ inner. panic_if_treat_err_as_bug ( ) ;
1172
1173
}
1173
1174
1174
1175
inner. emitter . emit_unused_externs ( lint_level, unused_externs)
@@ -1353,10 +1354,11 @@ impl DiagCtxtInner {
1353
1354
}
1354
1355
if diagnostic. is_error ( ) {
1355
1356
if diagnostic. is_lint {
1356
- self . bump_lint_err_count ( ) ;
1357
+ self . lint_err_count += 1 ;
1357
1358
} else {
1358
- self . bump_err_count ( ) ;
1359
+ self . err_count += 1 ;
1359
1360
}
1361
+ self . panic_if_treat_err_as_bug ( ) ;
1360
1362
1361
1363
#[ allow( deprecated) ]
1362
1364
{
@@ -1447,16 +1449,6 @@ impl DiagCtxtInner {
1447
1449
panic:: panic_any ( DelayedBugPanic ) ;
1448
1450
}
1449
1451
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
-
1460
1452
fn panic_if_treat_err_as_bug ( & self ) {
1461
1453
if self . treat_err_as_bug ( ) {
1462
1454
match (
You can’t perform that action at this time.
0 commit comments