Update tests.
This commit is contained in:
parent
47080eacf8
commit
1b83dcffce
6 changed files with 216 additions and 180 deletions
|
@ -44,19 +44,19 @@ fn main() {
|
||||||
|
|
||||||
// Release success order forbids failure order of Acquire or SeqCst
|
// Release success order forbids failure order of Acquire or SeqCst
|
||||||
let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Release, Ordering::Acquire);
|
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);
|
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
|
// Relaxed success order also forbids failure order of Acquire or SeqCst
|
||||||
let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Relaxed, Ordering::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);
|
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
|
// Acquire/AcqRel forbids failure order of SeqCst
|
||||||
let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Acquire, Ordering::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);
|
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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:22:67
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Relaxed, Ordering::AcqRel);
|
LL | let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Relaxed, Ordering::AcqRel);
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^ invalid failure ordering
|
||||||
|
|
|
|
||||||
= note: `#[deny(invalid_atomic_ordering)]` on by default
|
= 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
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:24:67
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Acquire, Ordering::AcqRel);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:26:67
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Release, Ordering::AcqRel);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:28:66
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::AcqRel, Ordering::AcqRel);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:30:66
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::SeqCst, Ordering::AcqRel);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:34:67
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Relaxed, Ordering::Release);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:36:67
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Acquire, Ordering::Release);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:38:67
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Release, Ordering::Release);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:40:66
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::AcqRel, Ordering::Release);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:42:66
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::SeqCst, Ordering::Release);
|
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`
|
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:67
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:46:48
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Release, Ordering::Acquire);
|
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`
|
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:67
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:48:48
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Release, Ordering::SeqCst);
|
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`
|
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:67
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:52:48
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Relaxed, Ordering::SeqCst);
|
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`
|
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:67
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:54:48
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr, ptr2, Ordering::Relaxed, Ordering::Acquire);
|
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`
|
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:67
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:58:48
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::Acquire, Ordering::SeqCst);
|
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`
|
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:66
|
--> $DIR/lint-invalid-atomic-ordering-exchange-weak.rs:60:48
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange_weak(ptr2, ptr, Ordering::AcqRel, Ordering::SeqCst);
|
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
|
error: aborting due to 16 previous errors
|
||||||
|
|
||||||
|
|
|
@ -42,19 +42,19 @@ fn main() {
|
||||||
|
|
||||||
// Release success order forbids failure order of Acquire or SeqCst
|
// Release success order forbids failure order of Acquire or SeqCst
|
||||||
let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::Acquire);
|
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);
|
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
|
// Relaxed success order also forbids failure order of Acquire or SeqCst
|
||||||
let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::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);
|
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
|
// Acquire/AcqRel forbids failure order of SeqCst
|
||||||
let _ = x.compare_exchange(0, 0, Ordering::Acquire, Ordering::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);
|
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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:20:57
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::AcqRel);
|
LL | let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::AcqRel);
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^ invalid failure ordering
|
||||||
|
|
|
|
||||||
= note: `#[deny(invalid_atomic_ordering)]` on by default
|
= 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
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:22:57
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Acquire, Ordering::AcqRel);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:24:57
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::AcqRel);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:26:56
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::AcqRel, Ordering::AcqRel);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:28:56
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::SeqCst, Ordering::AcqRel);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:32:57
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::Release);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:34:57
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Acquire, Ordering::Release);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:36:57
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::Release);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:38:56
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::AcqRel, Ordering::Release);
|
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
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:40:56
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::SeqCst, Ordering::Release);
|
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`
|
error: compare_exchange's success ordering must be at least as strong as its failure ordering
|
||||||
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:44:57
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:44:38
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::Acquire);
|
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`
|
error: compare_exchange's success ordering must be at least as strong as its failure ordering
|
||||||
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:46:57
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:46:38
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Release, Ordering::SeqCst);
|
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`
|
error: compare_exchange's success ordering must be at least as strong as its failure ordering
|
||||||
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:50:57
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:50:38
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::SeqCst);
|
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`
|
error: compare_exchange's success ordering must be at least as strong as its failure ordering
|
||||||
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:52:57
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:52:38
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Relaxed, Ordering::Acquire);
|
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`
|
error: compare_exchange's success ordering must be at least as strong as its failure ordering
|
||||||
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:56:57
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:56:38
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::Acquire, Ordering::SeqCst);
|
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`
|
error: compare_exchange's success ordering must be at least as strong as its failure ordering
|
||||||
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:58:56
|
--> $DIR/lint-invalid-atomic-ordering-exchange.rs:58:38
|
||||||
|
|
|
|
||||||
LL | let _ = x.compare_exchange(0, 0, Ordering::AcqRel, Ordering::SeqCst);
|
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
|
error: aborting due to 16 previous errors
|
||||||
|
|
||||||
|
|
|
@ -42,19 +42,19 @@ fn main() {
|
||||||
|
|
||||||
// Release success order forbids failure order of Acquire or SeqCst
|
// Release success order forbids failure order of Acquire or SeqCst
|
||||||
let _ = x.fetch_update(Ordering::Release, Ordering::Acquire, |old| Some(old + 1));
|
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));
|
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
|
// Relaxed success order also forbids failure order of Acquire or SeqCst
|
||||||
let _ = x.fetch_update(Ordering::Relaxed, Ordering::SeqCst, |old| Some(old + 1));
|
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));
|
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
|
// Acquire/AcqRel forbids failure order of SeqCst
|
||||||
let _ = x.fetch_update(Ordering::Acquire, Ordering::SeqCst, |old| Some(old + 1));
|
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));
|
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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:20:47
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Relaxed, Ordering::AcqRel, |old| Some(old + 1));
|
LL | let _ = x.fetch_update(Ordering::Relaxed, Ordering::AcqRel, |old| Some(old + 1));
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^ invalid failure ordering
|
||||||
|
|
|
|
||||||
= note: `#[deny(invalid_atomic_ordering)]` on by default
|
= 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
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:22:47
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Acquire, Ordering::AcqRel, |old| Some(old + 1));
|
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
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:24:47
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Release, Ordering::AcqRel, |old| Some(old + 1));
|
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
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:26:46
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::AcqRel, Ordering::AcqRel, |old| Some(old + 1));
|
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
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:28:46
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::SeqCst, Ordering::AcqRel, |old| Some(old + 1));
|
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
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:32:47
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Relaxed, Ordering::Release, |old| Some(old + 1));
|
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
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:34:47
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Acquire, Ordering::Release, |old| Some(old + 1));
|
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
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:36:47
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Release, Ordering::Release, |old| Some(old + 1));
|
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
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:38:46
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::AcqRel, Ordering::Release, |old| Some(old + 1));
|
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
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:40:46
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::SeqCst, Ordering::Release, |old| Some(old + 1));
|
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`
|
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:47
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:44:28
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Release, Ordering::Acquire, |old| Some(old + 1));
|
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`
|
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:47
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:46:28
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Release, Ordering::SeqCst, |old| Some(old + 1));
|
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`
|
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:47
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:50:28
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Relaxed, Ordering::SeqCst, |old| Some(old + 1));
|
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`
|
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:47
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:52:28
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Relaxed, Ordering::Acquire, |old| Some(old + 1));
|
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`
|
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:47
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:56:28
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::Acquire, Ordering::SeqCst, |old| Some(old + 1));
|
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`
|
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:46
|
--> $DIR/lint-invalid-atomic-ordering-fetch-update.rs:58:28
|
||||||
|
|
|
|
||||||
LL | let _ = x.fetch_update(Ordering::AcqRel, Ordering::SeqCst, |old| Some(old + 1));
|
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
|
error: aborting due to 16 previous errors
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue