From 8b7299dd12b06b2f41707dda8562e0182c9d5672 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Tue, 31 May 2022 22:42:42 +0100 Subject: Remove `likely!` and `unlikely!` macro from compiler --- compiler/rustc_data_structures/src/profiling.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_data_structures/src/profiling.rs') diff --git a/compiler/rustc_data_structures/src/profiling.rs b/compiler/rustc_data_structures/src/profiling.rs index a1f42d8d3c0..88ff33b4d09 100644 --- a/compiler/rustc_data_structures/src/profiling.rs +++ b/compiler/rustc_data_structures/src/profiling.rs @@ -195,6 +195,7 @@ impl SelfProfilerRef { F: for<'a> FnOnce(&'a SelfProfiler) -> TimingGuard<'a>, { #[inline(never)] + #[cold] fn cold_call(profiler_ref: &SelfProfilerRef, f: F) -> TimingGuard<'_> where F: for<'a> FnOnce(&'a SelfProfiler) -> TimingGuard<'a>, @@ -203,7 +204,7 @@ impl SelfProfilerRef { f(&**profiler) } - if unlikely!(self.event_filter_mask.contains(event_filter)) { + if self.event_filter_mask.contains(event_filter) { cold_call(self, f) } else { TimingGuard::none() -- cgit 1.4.1-3-g733a5