We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 256a6e4 commit 97ab37eCopy full SHA for 97ab37e
src/librustc/util/profiling.rs
@@ -161,16 +161,6 @@ pub struct SelfProfiler {
161
current_timer: Instant,
162
}
163
164
-pub struct ProfilerActivity<'a>(ProfileCategory, &'a mut SelfProfiler);
165
-
166
-impl<'a> Drop for ProfilerActivity<'a> {
167
- fn drop(&mut self) {
168
- let ProfilerActivity (category, profiler) = self;
169
170
- profiler.end_activity(*category);
171
- }
172
-}
173
174
impl SelfProfiler {
175
pub fn new() -> SelfProfiler {
176
let mut profiler = SelfProfiler {
@@ -281,10 +271,4 @@ impl SelfProfiler {
281
271
282
272
fs::write("self_profiler_results.json", json).unwrap();
283
273
284
285
- pub fn record_activity<'a>(&'a mut self, category: ProfileCategory) -> ProfilerActivity<'a> {
286
- self.start_activity(category);
287
288
- ProfilerActivity(category, self)
289
290
274
+}
0 commit comments