Skip to content

Commit 2593df8

Browse files
committed
core: unstably expose atomic_compare_exchange so stdarch can use it
1 parent 77101fe commit 2593df8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/core/src/sync/atomic.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3885,10 +3885,13 @@ unsafe fn atomic_sub<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
38853885
}
38863886
}
38873887

3888+
/// Publicly exposed for stdarch; nobody else should use this.
38883889
#[inline]
38893890
#[cfg(target_has_atomic)]
38903891
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3891-
unsafe fn atomic_compare_exchange<T: Copy>(
3892+
#[unstable(feature = "core_intrinsics", issue = "none")]
3893+
#[doc(hidden)]
3894+
pub unsafe fn atomic_compare_exchange<T: Copy>(
38923895
dst: *mut T,
38933896
old: T,
38943897
new: T,

0 commit comments

Comments
 (0)