|
113 | 113 | #![stable(feature = "rust1", since = "1.0.0")]
|
114 | 114 | #![cfg_attr(not(target_has_atomic_load_store = "8"), allow(dead_code))]
|
115 | 115 | #![cfg_attr(not(target_has_atomic_load_store = "8"), allow(unused_imports))]
|
| 116 | +#![rustc_diagnostic_item = "atomic_mod"] |
116 | 117 |
|
117 | 118 | use self::Ordering::*;
|
118 | 119 |
|
@@ -198,6 +199,7 @@ unsafe impl<T> Sync for AtomicPtr<T> {}
|
198 | 199 | #[stable(feature = "rust1", since = "1.0.0")]
|
199 | 200 | #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
200 | 201 | #[non_exhaustive]
|
| 202 | +#[rustc_diagnostic_item = "Ordering"] |
201 | 203 | pub enum Ordering {
|
202 | 204 | /// No ordering constraints, only atomic operations.
|
203 | 205 | ///
|
@@ -2664,6 +2666,7 @@ unsafe fn atomic_umin<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
|
2664 | 2666 | /// ```
|
2665 | 2667 | #[inline]
|
2666 | 2668 | #[stable(feature = "rust1", since = "1.0.0")]
|
| 2669 | +#[rustc_diagnostic_item = "fence"] |
2667 | 2670 | pub fn fence(order: Ordering) {
|
2668 | 2671 | // SAFETY: using an atomic fence is safe.
|
2669 | 2672 | unsafe {
|
@@ -2745,6 +2748,7 @@ pub fn fence(order: Ordering) {
|
2745 | 2748 | /// [memory barriers]: https://www.kernel.org/doc/Documentation/memory-barriers.txt
|
2746 | 2749 | #[inline]
|
2747 | 2750 | #[stable(feature = "compiler_fences", since = "1.21.0")]
|
| 2751 | +#[rustc_diagnostic_item = "compiler_fence"] |
2748 | 2752 | pub fn compiler_fence(order: Ordering) {
|
2749 | 2753 | // SAFETY: using an atomic fence is safe.
|
2750 | 2754 | unsafe {
|
|
0 commit comments