about summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-01-23 15:23:22 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-01-23 15:23:22 +0000
commitdb7cd5709133ef4a0e45bc13b1b3db7cbf1b3c8f (patch)
tree86f17dce9926cbb2fb9323ff4fd213ae60a2f492 /compiler/rustc_session/src
parent0e4243538b9119654c22dce688f8a63c81864de9 (diff)
downloadrust-db7cd5709133ef4a0e45bc13b1b3db7cbf1b3c8f.tar.gz
rust-db7cd5709133ef4a0e45bc13b1b3db7cbf1b3c8f.zip
Remove track_errors entirely
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/session.rs14
1 files changed, 0 insertions, 14 deletions
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<F, T>(&self, f: F) -> Result<T, ErrorGuaranteed>
-    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.