From db7cd5709133ef4a0e45bc13b1b3db7cbf1b3c8f Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 23 Jan 2024 15:23:22 +0000 Subject: Remove track_errors entirely --- compiler/rustc_session/src/session.rs | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 24aa336c68f..c81261cc5a8 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -332,20 +332,6 @@ impl Session { } } - // FIXME(matthewjasper) Remove this method, it should never be needed. - pub fn track_errors(&self, f: F) -> Result - where - F: FnOnce() -> T, - { - let old_count = self.dcx().err_count(); - let result = f(); - if self.dcx().err_count() == old_count { - Ok(result) - } else { - Err(self.dcx().delayed_bug("`self.err_count()` changed but an error was not emitted")) - } - } - /// Used for code paths of expensive computations that should only take place when /// warnings or errors are emitted. If no messages are emitted ("good path"), then /// it's likely a bug. -- cgit 1.4.1-3-g733a5