static INVALID_ATOMIC_ORDERING: &Lint
invalid_atomic_ordering lint detects passing an
to an atomic operation that does not support that ordering.
let atom = AtomicU8::new(0); let value = atom.load(Ordering::Release);
Some atomic operations are only supported for a subset of the
atomic::Ordering variants. Passing an unsupported variant will cause
an unconditional panic at runtime, which is detected by this lint.
This lint will trigger in the following cases: (where
AtomicType is an
atomic type from
core::sync::atomic, such as
AtomicUsize, or any of the other integer atomics).
Ordering::AcqRelas the failure ordering for any of