From 06cf8819690c586fe3bf0b710e6859202095ac15 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 9 Jan 2024 12:35:03 +1100 Subject: Rename `TRACK_DIAGNOSTICS` as `TRACK_DIAGNOSTIC`. Because the values put into it are functions named `track_diagnostic` and `default_track_diagnostic`. --- compiler/rustc_errors/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_errors/src') diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 1f5ad56a42a..d27fe8779f4 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -513,7 +513,7 @@ fn default_track_diagnostic(diag: Diagnostic, f: &mut dyn FnMut(Diagnostic)) { (*f)(diag) } -pub static TRACK_DIAGNOSTICS: AtomicRef = +pub static TRACK_DIAGNOSTIC: AtomicRef = AtomicRef::new(&(default_track_diagnostic as _)); #[derive(Copy, Clone, Default)] @@ -1309,18 +1309,18 @@ impl DiagCtxtInner { && !diagnostic.is_force_warn() { if diagnostic.has_future_breakage() { - (*TRACK_DIAGNOSTICS)(diagnostic, &mut |_| {}); + (*TRACK_DIAGNOSTIC)(diagnostic, &mut |_| {}); } return None; } if matches!(diagnostic.level, Expect(_) | Allow) { - (*TRACK_DIAGNOSTICS)(diagnostic, &mut |_| {}); + (*TRACK_DIAGNOSTIC)(diagnostic, &mut |_| {}); return None; } let mut guaranteed = None; - (*TRACK_DIAGNOSTICS)(diagnostic, &mut |mut diagnostic| { + (*TRACK_DIAGNOSTIC)(diagnostic, &mut |mut diagnostic| { if let Some(ref code) = diagnostic.code { self.emitted_diagnostic_codes.insert(code.clone()); } -- cgit 1.4.1-3-g733a5