From 807c8687de342bd11a7038df54946f4abcc03d2c Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 15 Jan 2024 14:41:12 +1100 Subject: [PATCH] Count "unused extern" errors as lints rather than normal errors. --- compiler/rustc_errors/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 17bcc31c006..e47daf4afa1 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -1162,7 +1162,7 @@ impl DiagCtxt { let mut inner = self.inner.borrow_mut(); if loud && lint_level.is_error() { - inner.err_count += 1; + inner.lint_err_count += 1; inner.panic_if_treat_err_as_bug(); }