From 97ab37e2dcd85ec42f5b90495340322a16c09102 Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Wed, 20 Jun 2018 07:57:22 -0400 Subject: [PATCH] Remove some dead code --- src/librustc/util/profiling.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/librustc/util/profiling.rs b/src/librustc/util/profiling.rs index 6bdc17a74ba..951c5277d0d 100644 --- a/src/librustc/util/profiling.rs +++ b/src/librustc/util/profiling.rs @@ -161,16 +161,6 @@ pub struct SelfProfiler { current_timer: Instant, } -pub struct ProfilerActivity<'a>(ProfileCategory, &'a mut SelfProfiler); - -impl<'a> Drop for ProfilerActivity<'a> { - fn drop(&mut self) { - let ProfilerActivity (category, profiler) = self; - - profiler.end_activity(*category); - } -} - impl SelfProfiler { pub fn new() -> SelfProfiler { let mut profiler = SelfProfiler { @@ -281,10 +271,4 @@ impl SelfProfiler { fs::write("self_profiler_results.json", json).unwrap(); } - - pub fn record_activity<'a>(&'a mut self, category: ProfileCategory) -> ProfilerActivity<'a> { - self.start_activity(category); - - ProfilerActivity(category, self) - } -} \ No newline at end of file +}