about summary refs log tree commit diff
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2024-04-12 17:54:35 +0300
committerklensy <klensy@users.noreply.github.com>2024-04-12 17:54:35 +0300
commitaff5f47dcef8e4616101a525cee7ecfd41183e6b (patch)
tree754a11d802949133c9c390619a83f0b2f0ea30d2
parentab71ee7a9214c2793108a41efb065aa77aeb7326 (diff)
downloadrust-aff5f47dcef8e4616101a525cee7ecfd41183e6b.tar.gz
rust-aff5f47dcef8e4616101a525cee7ecfd41183e6b.zip
remove dead code
-rw-r--r--compiler/rustc_middle/src/util/common.rs30
1 files changed, 0 insertions, 30 deletions
diff --git a/compiler/rustc_middle/src/util/common.rs b/compiler/rustc_middle/src/util/common.rs
index dd3a36c7bf8..0699e0b6269 100644
--- a/compiler/rustc_middle/src/util/common.rs
+++ b/compiler/rustc_middle/src/util/common.rs
@@ -1,8 +1,3 @@
-use rustc_data_structures::sync::Lock;
-
-use std::fmt::Debug;
-use std::time::{Duration, Instant};
-
 #[cfg(test)]
 mod tests;
 
@@ -26,31 +21,6 @@ pub fn to_readable_str(mut val: usize) -> String {
     groups.join("_")
 }
 
-pub fn record_time<T, F>(accu: &Lock<Duration>, f: F) -> T
-where
-    F: FnOnce() -> T,
-{
-    let start = Instant::now();
-    let rv = f();
-    let duration = start.elapsed();
-    let mut accu = accu.lock();
-    *accu += duration;
-    rv
-}
-
-pub fn indent<R, F>(op: F) -> R
-where
-    R: Debug,
-    F: FnOnce() -> R,
-{
-    // Use in conjunction with the log post-processor like `src/etc/indenter`
-    // to make debug output more readable.
-    debug!(">>");
-    let r = op();
-    debug!("<< (Result = {:?})", r);
-    r
-}
-
 pub struct Indenter {
     _cannot_construct_outside_of_this_module: (),
 }