rust/compiler/rustc_session/src
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
..
config Change process spawning to inherit the parent's signal mask by default 2022-10-20 14:53:38 -07:00
cgu_reuse_tracker.rs Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
code_stats.rs Properly print generator interior type sizes 2022-12-07 18:33:26 +00:00
config.rs Rollup merge of #106856 - vadorovsky:fix-atomic-annotations, r=joshtriplett 2023-01-27 12:57:54 +09:00
cstore.rs Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
errors.rs Print correct base for too-large literals 2023-01-02 11:43:07 +00:00
filesearch.rs Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
lib.rs remove cfg(bootstrap) 2022-09-26 10:14:45 +02:00
options.rs Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco 2023-01-11 17:30:56 +01:00
output.rs Auto merge of #106810 - oli-obk:resolver_reverse_plumbing, r=petrochenkov 2023-01-19 05:23:40 +00:00
parse.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
search_paths.rs incr. comp.: Don't export impl_stable_hash_via_hash!() and warn about using it. 2022-04-19 10:43:20 +02:00
session.rs Auto merge of #106810 - oli-obk:resolver_reverse_plumbing, r=petrochenkov 2023-01-19 05:23:40 +00:00
utils.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00