From bb8a0ffa23d235e06280ff0d0b96f0b0e763d35c Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 7 Mar 2023 08:39:30 -0500 Subject: Bump to latest beta --- library/core/src/sync/atomic.rs | 45 ++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 30 deletions(-) (limited to 'library/core/src/sync') diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index 123561873a6..2f6b1c74da0 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -1951,8 +1951,7 @@ macro_rules! if_not_8_bit { ($_:ident, $($tt:tt)*) => { $($tt)* }; } -#[cfg_attr(not(bootstrap), cfg(target_has_atomic_load_store))] -#[cfg_attr(bootstrap, cfg(target_has_atomic_load_store = "8"))] +#[cfg(target_has_atomic_load_store)] macro_rules! atomic_int { ($cfg_cas:meta, $cfg_align:meta, @@ -3125,8 +3124,7 @@ atomic_int_ptr_sized! { } #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] fn strongest_failure_ordering(order: Ordering) -> Ordering { match order { Release => Relaxed, @@ -3168,8 +3166,7 @@ unsafe fn atomic_load(dst: *const T, order: Ordering) -> T { } #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_swap(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_swap`. @@ -3186,8 +3183,7 @@ unsafe fn atomic_swap(dst: *mut T, val: T, order: Ordering) -> T { /// Returns the previous value (like __sync_fetch_and_add). #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_add(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_add`. @@ -3204,8 +3200,7 @@ unsafe fn atomic_add(dst: *mut T, val: T, order: Ordering) -> T { /// Returns the previous value (like __sync_fetch_and_sub). #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_sub(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_sub`. @@ -3221,8 +3216,7 @@ unsafe fn atomic_sub(dst: *mut T, val: T, order: Ordering) -> T { } #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_compare_exchange( dst: *mut T, @@ -3257,8 +3251,7 @@ unsafe fn atomic_compare_exchange( } #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_compare_exchange_weak( dst: *mut T, @@ -3293,8 +3286,7 @@ unsafe fn atomic_compare_exchange_weak( } #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_and(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_and` @@ -3310,8 +3302,7 @@ unsafe fn atomic_and(dst: *mut T, val: T, order: Ordering) -> T { } #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_nand(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_nand` @@ -3327,8 +3318,7 @@ unsafe fn atomic_nand(dst: *mut T, val: T, order: Ordering) -> T { } #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_or(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_or` @@ -3344,8 +3334,7 @@ unsafe fn atomic_or(dst: *mut T, val: T, order: Ordering) -> T { } #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_xor(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_xor` @@ -3362,8 +3351,7 @@ unsafe fn atomic_xor(dst: *mut T, val: T, order: Ordering) -> T { /// returns the max value (signed comparison) #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_max(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_max` @@ -3380,8 +3368,7 @@ unsafe fn atomic_max(dst: *mut T, val: T, order: Ordering) -> T { /// returns the min value (signed comparison) #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_min(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_min` @@ -3398,8 +3385,7 @@ unsafe fn atomic_min(dst: *mut T, val: T, order: Ordering) -> T { /// returns the max value (unsigned comparison) #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_umax(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_umax` @@ -3416,8 +3402,7 @@ unsafe fn atomic_umax(dst: *mut T, val: T, order: Ordering) -> T { /// returns the min value (unsigned comparison) #[inline] -#[cfg_attr(not(bootstrap), cfg(target_has_atomic))] -#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))] +#[cfg(target_has_atomic)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces unsafe fn atomic_umin(dst: *mut T, val: T, order: Ordering) -> T { // SAFETY: the caller must uphold the safety contract for `atomic_umin` -- cgit 1.4.1-3-g733a5