Files
rust/compiler/rustc_error_codes/src/error_codes
Dylan DPC 45740acd34 Rollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiasko
Simplify memory ordering intrinsics

This changes the names of the atomic intrinsics to always fully include their memory ordering arguments.

```diff
- atomic_cxchg
+ atomic_cxchg_seqcst_seqcst

- atomic_cxchg_acqrel
+ atomic_cxchg_acqrel_release

- atomic_cxchg_acqrel_failrelaxed
+ atomic_cxchg_acqrel_relaxed

// And so on.
```

- `seqcst` is no longer implied
- The failure ordering on chxchg is no longer implied in some cases, but now always explicitly part of the name.
- `release` is no longer shortened to just `rel`. That was especially confusing, since `relaxed` also starts with `rel`.
- `acquire` is no longer shortened to just `acq`, such that the names now all match the `std::sync::atomic::Ordering` variants exactly.
- This now allows for more combinations on the compare exchange operations, such as `atomic_cxchg_acquire_release`, which is necessary for #68464.
- This PR only exposes the new possibilities through unstable intrinsics, but not yet through the stable API. That's for [a separate PR](https://github.com/rust-lang/rust/pull/98383) that requires an FCP.

Suffixes for operations with a single memory order:

| Order   | Before       | After      |
|---------|--------------|------------|
| Relaxed | `_relaxed`   | `_relaxed` |
| Acquire | `_acq`       | `_acquire` |
| Release | `_rel`       | `_release` |
| AcqRel  | `_acqrel`    | `_acqrel`  |
| SeqCst  | (none)       | `_seqcst`  |

Suffixes for compare-and-exchange operations with two memory orderings:

| Success | Failure | Before                   | After              |
|---------|---------|--------------------------|--------------------|
| Relaxed | Relaxed | `_relaxed`               | `_relaxed_relaxed` |
| Relaxed | Acquire | ❌                      | `_relaxed_acquire` |
| Relaxed | SeqCst  | ❌                      | `_relaxed_seqcst`  |
| Acquire | Relaxed | `_acq_failrelaxed`       | `_acquire_relaxed` |
| Acquire | Acquire | `_acq`                   | `_acquire_acquire` |
| Acquire | SeqCst  | ❌                      | `_acquire_seqcst`  |
| Release | Relaxed | `_rel`                   | `_release_relaxed` |
| Release | Acquire | ❌                      | `_release_acquire` |
| Release | SeqCst  | ❌                      | `_release_seqcst`  |
| AcqRel  | Relaxed | `_acqrel_failrelaxed`    | `_acqrel_relaxed`  |
| AcqRel  | Acquire | `_acqrel`                | `_acqrel_acquire`  |
| AcqRel  | SeqCst  | ❌                      | `_acqrel_seqcst`   |
| SeqCst  | Relaxed | `_failrelaxed`           | `_seqcst_relaxed`  |
| SeqCst  | Acquire | `_failacq`               | `_seqcst_acquire`  |
| SeqCst  | SeqCst  | (none)                   | `_seqcst_seqcst`   |
2022-06-29 10:28:18 +05:30
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-01-13 07:49:16 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-01-24 00:17:40 -05:00
…
2021-01-24 00:17:40 -05:00
2021-01-24 00:17:40 -05:00
…
…
…
…
…
…
…
…
2021-07-01 17:48:19 +02:00
…
…
…
…
…
…
…
…
2021-03-23 17:16:20 +00:00
2021-01-13 07:49:16 -05:00
…
…
…
2021-04-16 13:04:02 +08:00
…
…
…
…
2021-08-20 15:59:42 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-12-04 22:17:06 +09:00
…
…
…
2021-10-02 08:05:44 +07:00
…
2020-09-01 23:05:56 +10:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-10-25 12:20:25 +01:00
…
2022-06-03 17:16:41 -04:00
2021-06-07 14:20:39 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-01-15 16:50:48 +11:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-04-02 04:27:18 +09:00
…
…
…
…
…
…
…
…
…
…
2020-10-10 18:02:53 +09:00
…
…
…
…
…
…
2020-09-01 18:38:14 +01:00
…
2021-01-07 20:20:58 +09:00
…
…
…
…
…
…
…
…
…
…
2021-01-13 07:49:16 -05:00
2021-01-13 07:49:16 -05:00
2021-10-12 13:10:12 -07:00
…
…
…
2022-06-03 17:16:41 -04:00
…
…
2022-06-03 17:16:41 -04:00
…
…
…
…
…
…
…
…
…
…
…
2021-06-22 22:24:46 +10:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-08-03 11:11:17 +01:00
…
…
…
…
…
…
…
…
2022-04-14 21:19:46 -04:00
…
2022-04-14 21:19:46 -04:00
2022-04-14 21:19:46 -04:00
2021-07-26 22:59:16 +01:00
2022-04-14 21:19:46 -04:00
2022-04-14 22:44:21 -04:00
…
…
2021-04-08 02:52:00 +08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-09-07 18:48:22 -07:00
…
…
…
…
…
…
2021-07-28 16:33:02 -04:00
…
…
…
…
…
2022-06-03 17:16:41 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-07-27 15:47:49 -04:00
…
2022-03-27 14:09:52 +02:00
…
2022-02-24 18:50:33 -08:00
2022-02-24 18:50:33 -08:00
…
2021-06-14 07:42:15 +09:00
…
…
…
…
…
…
…
…
…
…
…
…
2022-04-30 10:48:38 -05:00
…
…
…
…
2022-06-03 17:16:41 -04:00
…
…
…
…
…
2021-07-21 10:58:35 +01:00
2021-01-13 07:49:16 -05:00
…
2022-02-28 15:51:05 +01:00
…
…
…
2020-12-26 18:24:10 +01:00
…
…
2022-04-14 21:19:46 -04:00
…
…
…
…
…
…
2021-07-30 00:33:30 +02:00
…
…
…
…
…
…
…
…
…
2021-04-08 02:52:00 +08:00
2020-09-08 21:07:52 +02:00
2020-09-21 21:04:56 +02:00
…
2022-06-03 17:16:41 -04:00
…
…
…
…
…
…
…
2022-06-03 17:16:41 -04:00
2020-09-08 21:32:03 +02:00
2020-09-30 18:10:17 +01:00
2020-09-30 18:10:17 +01:00
2021-04-13 16:55:54 +02:00
2021-04-13 16:55:54 +02:00
2021-08-30 22:18:55 -07:00
2022-01-21 17:38:21 +01:00
2022-06-05 22:24:14 -04:00