Skip to content

Commit aff5f47

Browse files
committed
remove dead code
1 parent ab71ee7 commit aff5f47

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

compiler/rustc_middle/src/util/common.rs

-30
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
use rustc_data_structures::sync::Lock;
2-
3-
use std::fmt::Debug;
4-
use std::time::{Duration, Instant};
5-
61
#[cfg(test)]
72
mod tests;
83

@@ -26,31 +21,6 @@ pub fn to_readable_str(mut val: usize) -> String {
2621
groups.join("_")
2722
}
2823

29-
pub fn record_time<T, F>(accu: &Lock<Duration>, f: F) -> T
30-
where
31-
F: FnOnce() -> T,
32-
{
33-
let start = Instant::now();
34-
let rv = f();
35-
let duration = start.elapsed();
36-
let mut accu = accu.lock();
37-
*accu += duration;
38-
rv
39-
}
40-
41-
pub fn indent<R, F>(op: F) -> R
42-
where
43-
R: Debug,
44-
F: FnOnce() -> R,
45-
{
46-
// Use in conjunction with the log post-processor like `src/etc/indenter`
47-
// to make debug output more readable.
48-
debug!(">>");
49-
let r = op();
50-
debug!("<< (Result = {:?})", r);
51-
r
52-
}
53-
5424
pub struct Indenter {
5525
_cannot_construct_outside_of_this_module: (),
5626
}

0 commit comments

Comments
 (0)