Skip to content

Commit

Permalink
core: fix spin_loop_hint deprecation (#1603)
Browse files Browse the repository at this point in the history
Allow the deprecated API for now, until the next MSRV bump.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
hawkw authored Sep 30, 2021
1 parent e448aa3 commit 96aa821
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tracing-core/src/spin/once.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use core::cell::UnsafeCell;
use core::fmt;
use core::sync::atomic::{spin_loop_hint as cpu_relax, AtomicUsize, Ordering};
use core::sync::atomic::{AtomicUsize, Ordering};
// TODO(eliza): replace with `core::hint::spin_loop` once our MSRV supports it.
#[allow(deprecated)]
use core::sync::atomic::spin_loop_hint as cpu_relax;

/// A synchronization primitive which can be used to run a one-time global
/// initialization. Unlike its std equivalent, this is generalized so that the
Expand Down

0 comments on commit 96aa821

Please sign in to comment.