rust/library
Yuki Okushi bf321ece1e
Rollup merge of #106856 - vadorovsky:fix-atomic-annotations, r=joshtriplett
core: Support variety of atomic widths in width-agnostic functions

Before this change, the following functions and macros were annotated with `#[cfg(target_has_atomic = "8")]` or
`#[cfg(target_has_atomic_load_store = "8")]`:

* `atomic_int`
* `strongest_failure_ordering`
* `atomic_swap`
* `atomic_add`
* `atomic_sub`
* `atomic_compare_exchange`
* `atomic_compare_exchange_weak`
* `atomic_and`
* `atomic_nand`
* `atomic_or`
* `atomic_xor`
* `atomic_max`
* `atomic_min`
* `atomic_umax`
* `atomic_umin`

However, none of those functions and macros actually depend on 8-bit width and they are needed for all atomic widths (16-bit, 32-bit, 64-bit etc.). Some targets might not support 8-bit atomics (i.e. BPF, if we would enable atomic CAS for it).

This change fixes that by removing the `"8"` argument from annotations, which results in accepting the whole variety of widths.

Fixes #106845
Fixes #106795

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2023-01-27 12:57:54 +09:00
..
alloc Rollup merge of #107109 - est31:thin_box_link, r=Mark-Simulacrum 2023-01-23 19:30:00 +09:00
backtrace@07872f28cd Update backtrace 2022-09-02 16:09:58 -04:00
core Rollup merge of #106856 - vadorovsky:fix-atomic-annotations, r=joshtriplett 2023-01-27 12:57:54 +09:00
panic_abort Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
panic_unwind Replace libstd, libcore, liballoc in docs. 2022-12-30 14:00:40 +01:00
portable-simd Remove unnecessary &format! 2023-01-21 22:06:42 -05:00
proc_macro Auto merge of #107318 - matthiaskrgr:rollup-776kd81, r=matthiaskrgr 2023-01-26 09:14:05 +00:00
profiler_builtins Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rtstartup Remove custom frame info registration on i686-pc-windows-gnu 2022-08-23 16:12:58 +08:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-std Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
std Rollup merge of #105784 - yanns:update_stdarch, r=Amanieu 2023-01-27 12:57:53 +09:00
stdarch@a0c30f3e3c update stdarch 2022-12-29 11:22:13 +01:00
test Rollup merge of #106767 - chbaker0:disable-unstable-features, r=Mark-Simulacrum 2023-01-25 17:01:41 +05:30
unwind Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00