about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2022-05-25 11:49:02 +0200
committerMara Bos <m-ou.se@m-ou.se>2022-05-25 12:00:13 +0200
commit1b83dcffcee773bc94db998f8c37e1b1bfb67698 (patch)
tree2f7bb3332e92abbdbe35bf45cb17f14f2588aa31
parent47080eacf83debe4cbd9bb8dbedaf2c29e084cbc (diff)
downloadrust-1b83dcffcee773bc94db998f8c37e1b1bfb67698.tar.gz
rust-1b83dcffcee773bc94db998f8c37e1b1bfb67698.zip
Update tests.
-rw-r--r--src/test/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs12
-rw-r--r--src/test/ui/lint/lint-invalid-atomic-ordering-exchange-weak.stderr120
-rw-r--r--src/test/ui/lint/lint-invalid-atomic-ordering-exchange.rs12
-rw-r--r--src/test/ui/lint/lint-invalid-atomic-ordering-exchange.stderr120
-rw-r--r--src/test/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs12
-rw-r--r--src/test/ui/lint/lint-invalid-atomic-ordering-fetch-update.stderr120
6 files changed, 216 insertions, 180 deletions
diff --git a/src/test/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs b/src/test/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs
index c79c1daf774..1f870d1ef72 100644
--- a/src/test/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs
+++ b/src/test/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs
@@ -44,19 +44,19 @@ fn main() {
 
     // Release success order forbids failure order of Acquire or SeqCst
     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Release, Ordering::Acquire);
-    //~^ ERROR compare_exchange_weak's failure ordering may not be stronger
+    //~^ ERROR compare_exchange_weak's success ordering must be at least as strong as
     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Release, Ordering::SeqCst);
-    //~^ ERROR compare_exchange_weak's failure ordering may not be stronger
+    //~^ ERROR compare_exchange_weak's success ordering must be at least as strong as
 
     // Relaxed success order also forbids failure order of Acquire or SeqCst
     let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Relaxed, Ordering::SeqCst);
-    //~^ ERROR compare_exchange_weak's failure ordering may not be stronger
+    //~^ ERROR compare_exchange_weak's success ordering must be at least as strong as
     let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Relaxed, Ordering::Acquire);
-    //~^ ERROR compare_exchange_weak's failure ordering may not be stronger
+    //~^ ERROR compare_exchange_weak's success ordering must be at least as strong as
 
     // Acquire/AcqRel forbids failure order of SeqCst
     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Acquire, Ordering::SeqCst);
-    //~^ ERROR compare_exchange_weak's failure ordering may not be stronger
+    //~^ ERROR compare_exchange_weak's success ordering must be at least as strong as
     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::AcqRel, Ordering::SeqCst);
-    //~^ ERROR compare_exchange_weak's failure ordering may not be stronger
+    //~^ ERROR compare_exchange_weak's success ordering must be at least as strong as
 }
diff --git a/src/test/ui/lint/lint-invalid-atomic-ordering-exchange-weak.stderr b/src/test/ui/lint/lint-invalid-atomic-ordering-exchange-weak.stderr
index 13350ab0b9c..8e816f7c482 100644
--- a/src/test/ui/lint/lint-invalid-atomic-ordering-exchange-weak.stderr
+++ b/src/test/ui/lint/lint-invalid-atomic-ordering-exchange-weak.stderr
@@ -1,131 +1,143 @@
-error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange_weak does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:22:67
    |
 LL |     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Relaxed, Ordering::AcqRel);
-   |                                                                   ^^^^^^^^^^^^^^^^
+   |                                                                   ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
    = note: `#[deny(invalid_atomic_ordering)]` on by default
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange_weak does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:24:67
    |
 LL |     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Acquire, Ordering::AcqRel);
-   |                                                                   ^^^^^^^^^^^^^^^^
+   |                                                                   ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange_weak does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:26:67
    |
 LL |     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Release, Ordering::AcqRel);
-   |                                                                   ^^^^^^^^^^^^^^^^
+   |                                                                   ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange_weak does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:28:66
    |
 LL |     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::AcqRel, Ordering::AcqRel);
-   |                                                                  ^^^^^^^^^^^^^^^^
+   |                                                                  ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange_weak does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:30:66
    |
 LL |     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::SeqCst, Ordering::AcqRel);
-   |                                                                  ^^^^^^^^^^^^^^^^
+   |                                                                  ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire`, `SeqCst` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange_weak does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:34:67
    |
 LL |     let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Relaxed, Ordering::Release);
-   |                                                                   ^^^^^^^^^^^^^^^^^
+   |                                                                   ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange_weak does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:36:67
    |
 LL |     let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Acquire, Ordering::Release);
-   |                                                                   ^^^^^^^^^^^^^^^^^
+   |                                                                   ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange_weak does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:38:67
    |
 LL |     let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Release, Ordering::Release);
-   |                                                                   ^^^^^^^^^^^^^^^^^
+   |                                                                   ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange_weak does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:40:66
    |
 LL |     let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::AcqRel, Ordering::Release);
-   |                                                                  ^^^^^^^^^^^^^^^^^
+   |                                                                  ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange_weak's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange_weak does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:42:66
    |
 LL |     let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::SeqCst, Ordering::Release);
-   |                                                                  ^^^^^^^^^^^^^^^^^
+   |                                                                  ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire`, `SeqCst` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange_weak's failure ordering may not be stronger than the success ordering of `Release`
-  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:46:67
+error: compare_exchange_weak's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:46:48
    |
 LL |     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Release, Ordering::Acquire);
-   |                                                                   ^^^^^^^^^^^^^^^^^
+   |                                                ^^^^^^^^^^^^^^^^^  ----------------- Acquire failure ordering
+   |                                                |
+   |                                                Release success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using AcqRel success ordering instead
 
-error: compare_exchange_weak's failure ordering may not be stronger than the success ordering of `Release`
-  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:48:67
+error: compare_exchange_weak's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:48:48
    |
 LL |     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Release, Ordering::SeqCst);
-   |                                                                   ^^^^^^^^^^^^^^^^
+   |                                                ^^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                                                |
+   |                                                Release success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
-error: compare_exchange_weak's failure ordering may not be stronger than the success ordering of `Relaxed`
-  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:52:67
+error: compare_exchange_weak's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:52:48
    |
 LL |     let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Relaxed, Ordering::SeqCst);
-   |                                                                   ^^^^^^^^^^^^^^^^
+   |                                                ^^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                                                |
+   |                                                Relaxed success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
-error: compare_exchange_weak's failure ordering may not be stronger than the success ordering of `Relaxed`
-  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:54:67
+error: compare_exchange_weak's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:54:48
    |
 LL |     let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Relaxed, Ordering::Acquire);
-   |                                                                   ^^^^^^^^^^^^^^^^^
+   |                                                ^^^^^^^^^^^^^^^^^  ----------------- Acquire failure ordering
+   |                                                |
+   |                                                Relaxed success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire success ordering instead
 
-error: compare_exchange_weak's failure ordering may not be stronger than the success ordering of `Acquire`
-  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:58:67
+error: compare_exchange_weak's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:58:48
    |
 LL |     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Acquire, Ordering::SeqCst);
-   |                                                                   ^^^^^^^^^^^^^^^^
+   |                                                ^^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                                                |
+   |                                                Acquire success ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
-error: compare_exchange_weak's failure ordering may not be stronger than the success ordering of `AcqRel`
-  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:60:66
+error: compare_exchange_weak's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:60:48
    |
 LL |     let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::AcqRel, Ordering::SeqCst);
-   |                                                                  ^^^^^^^^^^^^^^^^
+   |                                                ^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                                                |
+   |                                                AcqRel success ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
 error: aborting due to 16 previous errors
 
diff --git a/src/test/ui/lint/lint-invalid-atomic-ordering-exchange.rs b/src/test/ui/lint/lint-invalid-atomic-ordering-exchange.rs
index 8ef3a400cf0..1a5cb3dac6b 100644
--- a/src/test/ui/lint/lint-invalid-atomic-ordering-exchange.rs
+++ b/src/test/ui/lint/lint-invalid-atomic-ordering-exchange.rs
@@ -42,19 +42,19 @@ fn main() {
 
     // Release success order forbids failure order of Acquire or SeqCst
     let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::Acquire);
-    //~^ ERROR compare_exchange's failure ordering may not be stronger
+    //~^ ERROR compare_exchange's success ordering must be at least as strong as
     let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::SeqCst);
-    //~^ ERROR compare_exchange's failure ordering may not be stronger
+    //~^ ERROR compare_exchange's success ordering must be at least as strong as
 
     // Relaxed success order also forbids failure order of Acquire or SeqCst
     let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::SeqCst);
-    //~^ ERROR compare_exchange's failure ordering may not be stronger
+    //~^ ERROR compare_exchange's success ordering must be at least as strong as
     let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::Acquire);
-    //~^ ERROR compare_exchange's failure ordering may not be stronger
+    //~^ ERROR compare_exchange's success ordering must be at least as strong as
 
     // Acquire/AcqRel forbids failure order of SeqCst
     let _ = x.compare_exchange(0, 0, Ordering::Acquire, Ordering::SeqCst);
-    //~^ ERROR compare_exchange's failure ordering may not be stronger
+    //~^ ERROR compare_exchange's success ordering must be at least as strong as
     let _ = x.compare_exchange(0, 0, Ordering::AcqRel, Ordering::SeqCst);
-    //~^ ERROR compare_exchange's failure ordering may not be stronger
+    //~^ ERROR compare_exchange's success ordering must be at least as strong as
 }
diff --git a/src/test/ui/lint/lint-invalid-atomic-ordering-exchange.stderr b/src/test/ui/lint/lint-invalid-atomic-ordering-exchange.stderr
index daedfec7430..eeeeb1fb5a9 100644
--- a/src/test/ui/lint/lint-invalid-atomic-ordering-exchange.stderr
+++ b/src/test/ui/lint/lint-invalid-atomic-ordering-exchange.stderr
@@ -1,131 +1,143 @@
-error: compare_exchange's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange.rs:20:57
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::AcqRel);
-   |                                                         ^^^^^^^^^^^^^^^^
+   |                                                         ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
    = note: `#[deny(invalid_atomic_ordering)]` on by default
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange.rs:22:57
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Acquire, Ordering::AcqRel);
-   |                                                         ^^^^^^^^^^^^^^^^
+   |                                                         ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange.rs:24:57
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::AcqRel);
-   |                                                         ^^^^^^^^^^^^^^^^
+   |                                                         ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange.rs:26:56
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::AcqRel, Ordering::AcqRel);
-   |                                                        ^^^^^^^^^^^^^^^^
+   |                                                        ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange.rs:28:56
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::SeqCst, Ordering::AcqRel);
-   |                                                        ^^^^^^^^^^^^^^^^
+   |                                                        ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire`, `SeqCst` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange.rs:32:57
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::Release);
-   |                                                         ^^^^^^^^^^^^^^^^^
+   |                                                         ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange.rs:34:57
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Acquire, Ordering::Release);
-   |                                                         ^^^^^^^^^^^^^^^^^
+   |                                                         ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange.rs:36:57
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::Release);
-   |                                                         ^^^^^^^^^^^^^^^^^
+   |                                                         ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange.rs:38:56
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::AcqRel, Ordering::Release);
-   |                                                        ^^^^^^^^^^^^^^^^^
+   |                                                        ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange's failure ordering may not be `Release` or `AcqRel`
+error: compare_exchange's failure ordering may not be `Release` or `AcqRel`, since a failed compare_exchange does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-exchange.rs:40:56
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::SeqCst, Ordering::Release);
-   |                                                        ^^^^^^^^^^^^^^^^^
+   |                                                        ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire`, `SeqCst` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: compare_exchange's failure ordering may not be stronger than the success ordering of `Release`
-  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:44:57
+error: compare_exchange's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:44:38
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::Acquire);
-   |                                                         ^^^^^^^^^^^^^^^^^
+   |                                      ^^^^^^^^^^^^^^^^^  ----------------- Acquire failure ordering
+   |                                      |
+   |                                      Release success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using AcqRel success ordering instead
 
-error: compare_exchange's failure ordering may not be stronger than the success ordering of `Release`
-  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:46:57
+error: compare_exchange's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:46:38
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::SeqCst);
-   |                                                         ^^^^^^^^^^^^^^^^
+   |                                      ^^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                                      |
+   |                                      Release success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
-error: compare_exchange's failure ordering may not be stronger than the success ordering of `Relaxed`
-  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:50:57
+error: compare_exchange's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:50:38
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::SeqCst);
-   |                                                         ^^^^^^^^^^^^^^^^
+   |                                      ^^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                                      |
+   |                                      Relaxed success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
-error: compare_exchange's failure ordering may not be stronger than the success ordering of `Relaxed`
-  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:52:57
+error: compare_exchange's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:52:38
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::Acquire);
-   |                                                         ^^^^^^^^^^^^^^^^^
+   |                                      ^^^^^^^^^^^^^^^^^  ----------------- Acquire failure ordering
+   |                                      |
+   |                                      Relaxed success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire success ordering instead
 
-error: compare_exchange's failure ordering may not be stronger than the success ordering of `Acquire`
-  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:56:57
+error: compare_exchange's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:56:38
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::Acquire, Ordering::SeqCst);
-   |                                                         ^^^^^^^^^^^^^^^^
+   |                                      ^^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                                      |
+   |                                      Acquire success ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
-error: compare_exchange's failure ordering may not be stronger than the success ordering of `AcqRel`
-  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:58:56
+error: compare_exchange's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-exchange.rs:58:38
    |
 LL |     let _ = x.compare_exchange(0, 0, Ordering::AcqRel, Ordering::SeqCst);
-   |                                                        ^^^^^^^^^^^^^^^^
+   |                                      ^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                                      |
+   |                                      AcqRel success ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
 error: aborting due to 16 previous errors
 
diff --git a/src/test/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs b/src/test/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs
index 938ca0359f8..dcf277dfacc 100644
--- a/src/test/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs
+++ b/src/test/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs
@@ -42,19 +42,19 @@ fn main() {
 
     // Release success order forbids failure order of Acquire or SeqCst
     let _ = x.fetch_update(Ordering::Release, Ordering::Acquire, |old| Some(old + 1));
-    //~^ ERROR fetch_update's failure ordering may not be stronger
+    //~^ ERROR fetch_update's success ordering must be at least as strong as
     let _ = x.fetch_update(Ordering::Release, Ordering::SeqCst, |old| Some(old + 1));
-    //~^ ERROR fetch_update's failure ordering may not be stronger
+    //~^ ERROR fetch_update's success ordering must be at least as strong as
 
     // Relaxed success order also forbids failure order of Acquire or SeqCst
     let _ = x.fetch_update(Ordering::Relaxed, Ordering::SeqCst, |old| Some(old + 1));
-    //~^ ERROR fetch_update's failure ordering may not be stronger
+    //~^ ERROR fetch_update's success ordering must be at least as strong as
     let _ = x.fetch_update(Ordering::Relaxed, Ordering::Acquire, |old| Some(old + 1));
-    //~^ ERROR fetch_update's failure ordering may not be stronger
+    //~^ ERROR fetch_update's success ordering must be at least as strong as
 
     // Acquire/AcqRel forbids failure order of SeqCst
     let _ = x.fetch_update(Ordering::Acquire, Ordering::SeqCst, |old| Some(old + 1));
-    //~^ ERROR fetch_update's failure ordering may not be stronger
+    //~^ ERROR fetch_update's success ordering must be at least as strong as
     let _ = x.fetch_update(Ordering::AcqRel, Ordering::SeqCst, |old| Some(old + 1));
-    //~^ ERROR fetch_update's failure ordering may not be stronger
+    //~^ ERROR fetch_update's success ordering must be at least as strong as
 }
diff --git a/src/test/ui/lint/lint-invalid-atomic-ordering-fetch-update.stderr b/src/test/ui/lint/lint-invalid-atomic-ordering-fetch-update.stderr
index dabc1da7e55..f63d059d429 100644
--- a/src/test/ui/lint/lint-invalid-atomic-ordering-fetch-update.stderr
+++ b/src/test/ui/lint/lint-invalid-atomic-ordering-fetch-update.stderr
@@ -1,131 +1,143 @@
-error: fetch_update's failure ordering may not be `Release` or `AcqRel`
+error: fetch_update's failure ordering may not be `Release` or `AcqRel`, since a failed fetch_update does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:20:47
    |
 LL |     let _ = x.fetch_update(Ordering::Relaxed, Ordering::AcqRel, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^
+   |                                               ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
    = note: `#[deny(invalid_atomic_ordering)]` on by default
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: fetch_update's failure ordering may not be `Release` or `AcqRel`
+error: fetch_update's failure ordering may not be `Release` or `AcqRel`, since a failed fetch_update does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:22:47
    |
 LL |     let _ = x.fetch_update(Ordering::Acquire, Ordering::AcqRel, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^
+   |                                               ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: fetch_update's failure ordering may not be `Release` or `AcqRel`
+error: fetch_update's failure ordering may not be `Release` or `AcqRel`, since a failed fetch_update does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:24:47
    |
 LL |     let _ = x.fetch_update(Ordering::Release, Ordering::AcqRel, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^
+   |                                               ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: fetch_update's failure ordering may not be `Release` or `AcqRel`
+error: fetch_update's failure ordering may not be `Release` or `AcqRel`, since a failed fetch_update does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:26:46
    |
 LL |     let _ = x.fetch_update(Ordering::AcqRel, Ordering::AcqRel, |old| Some(old + 1));
-   |                                              ^^^^^^^^^^^^^^^^
+   |                                              ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: fetch_update's failure ordering may not be `Release` or `AcqRel`
+error: fetch_update's failure ordering may not be `Release` or `AcqRel`, since a failed fetch_update does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:28:46
    |
 LL |     let _ = x.fetch_update(Ordering::SeqCst, Ordering::AcqRel, |old| Some(old + 1));
-   |                                              ^^^^^^^^^^^^^^^^
+   |                                              ^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire`, `SeqCst` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: fetch_update's failure ordering may not be `Release` or `AcqRel`
+error: fetch_update's failure ordering may not be `Release` or `AcqRel`, since a failed fetch_update does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:32:47
    |
 LL |     let _ = x.fetch_update(Ordering::Relaxed, Ordering::Release, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^^
+   |                                               ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: fetch_update's failure ordering may not be `Release` or `AcqRel`
+error: fetch_update's failure ordering may not be `Release` or `AcqRel`, since a failed fetch_update does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:34:47
    |
 LL |     let _ = x.fetch_update(Ordering::Acquire, Ordering::Release, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^^
+   |                                               ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: fetch_update's failure ordering may not be `Release` or `AcqRel`
+error: fetch_update's failure ordering may not be `Release` or `AcqRel`, since a failed fetch_update does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:36:47
    |
 LL |     let _ = x.fetch_update(Ordering::Release, Ordering::Release, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^^
+   |                                               ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: fetch_update's failure ordering may not be `Release` or `AcqRel`
+error: fetch_update's failure ordering may not be `Release` or `AcqRel`, since a failed fetch_update does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:38:46
    |
 LL |     let _ = x.fetch_update(Ordering::AcqRel, Ordering::Release, |old| Some(old + 1));
-   |                                              ^^^^^^^^^^^^^^^^^
+   |                                              ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: fetch_update's failure ordering may not be `Release` or `AcqRel`
+error: fetch_update's failure ordering may not be `Release` or `AcqRel`, since a failed fetch_update does not result in a write
   --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:40:46
    |
 LL |     let _ = x.fetch_update(Ordering::SeqCst, Ordering::Release, |old| Some(old + 1));
-   |                                              ^^^^^^^^^^^^^^^^^
+   |                                              ^^^^^^^^^^^^^^^^^ invalid failure ordering
    |
-   = help: consider using ordering modes `Acquire`, `SeqCst` or `Relaxed` instead
+   = help: consider using Acquire or Relaxed failure ordering instead
 
-error: fetch_update's failure ordering may not be stronger than the success ordering of `Release`
-  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:44:47
+error: fetch_update's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:44:28
    |
 LL |     let _ = x.fetch_update(Ordering::Release, Ordering::Acquire, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^^
+   |                            ^^^^^^^^^^^^^^^^^  ----------------- Acquire failure ordering
+   |                            |
+   |                            Release success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using AcqRel success ordering instead
 
-error: fetch_update's failure ordering may not be stronger than the success ordering of `Release`
-  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:46:47
+error: fetch_update's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:46:28
    |
 LL |     let _ = x.fetch_update(Ordering::Release, Ordering::SeqCst, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^
+   |                            ^^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                            |
+   |                            Release success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
-error: fetch_update's failure ordering may not be stronger than the success ordering of `Relaxed`
-  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:50:47
+error: fetch_update's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:50:28
    |
 LL |     let _ = x.fetch_update(Ordering::Relaxed, Ordering::SeqCst, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^
+   |                            ^^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                            |
+   |                            Relaxed success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
-error: fetch_update's failure ordering may not be stronger than the success ordering of `Relaxed`
-  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:52:47
+error: fetch_update's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:52:28
    |
 LL |     let _ = x.fetch_update(Ordering::Relaxed, Ordering::Acquire, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^^
+   |                            ^^^^^^^^^^^^^^^^^  ----------------- Acquire failure ordering
+   |                            |
+   |                            Relaxed success ordering
    |
-   = help: consider using ordering mode `Relaxed` instead
+   = help: consider using Acquire success ordering instead
 
-error: fetch_update's failure ordering may not be stronger than the success ordering of `Acquire`
-  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:56:47
+error: fetch_update's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:56:28
    |
 LL |     let _ = x.fetch_update(Ordering::Acquire, Ordering::SeqCst, |old| Some(old + 1));
-   |                                               ^^^^^^^^^^^^^^^^
+   |                            ^^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                            |
+   |                            Acquire success ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
-error: fetch_update's failure ordering may not be stronger than the success ordering of `AcqRel`
-  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:58:46
+error: fetch_update's success ordering must be at least as strong as its failure ordering
+  --> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:58:28
    |
 LL |     let _ = x.fetch_update(Ordering::AcqRel, Ordering::SeqCst, |old| Some(old + 1));
-   |                                              ^^^^^^^^^^^^^^^^
+   |                            ^^^^^^^^^^^^^^^^  ---------------- SeqCst failure ordering
+   |                            |
+   |                            AcqRel success ordering
    |
-   = help: consider using ordering modes `Acquire` or `Relaxed` instead
+   = help: consider using SeqCst success ordering instead
 
 error: aborting due to 16 previous errors