diff options
| author | klensy <klensy@users.noreply.github.com> | 2024-04-12 17:54:35 +0300 |
|---|---|---|
| committer | klensy <klensy@users.noreply.github.com> | 2024-04-12 17:54:35 +0300 |
| commit | aff5f47dcef8e4616101a525cee7ecfd41183e6b (patch) | |
| tree | 754a11d802949133c9c390619a83f0b2f0ea30d2 | |
| parent | ab71ee7a9214c2793108a41efb065aa77aeb7326 (diff) | |
| download | rust-aff5f47dcef8e4616101a525cee7ecfd41183e6b.tar.gz rust-aff5f47dcef8e4616101a525cee7ecfd41183e6b.zip | |
remove dead code
| -rw-r--r-- | compiler/rustc_middle/src/util/common.rs | 30 |
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: (), } |
