]> git.lizzy.rs Git - rust.git/commitdiff
Remove some dead code
authorWesley Wiser <wwiser@gmail.com>
Wed, 20 Jun 2018 11:57:22 +0000 (07:57 -0400)
committerWesley Wiser <wwiser@gmail.com>
Thu, 2 Aug 2018 22:57:24 +0000 (18:57 -0400)
src/librustc/util/profiling.rs

index 6bdc17a74ba46c3adaec8b2eaf8a118d6b744446..951c5277d0d78ed8e4993eee436e321efdc602e6 100644 (file)
@@ -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 @@ pub fn save_results(&self, opts: &Options) {
 
         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
+}