Add more diagnostic items
This commit is contained in:
parent
1388b38c52
commit
09b0b8b6e2
3 changed files with 18 additions and 0 deletions
|
@ -162,6 +162,7 @@ unsafe impl Sync for AtomicBool {}
|
|||
/// loads and stores of pointers. Its size depends on the target pointer's size.
|
||||
#[cfg(target_has_atomic_load_store = "ptr")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "AtomicPtr")]
|
||||
#[cfg_attr(target_pointer_width = "16", repr(C, align(2)))]
|
||||
#[cfg_attr(target_pointer_width = "32", repr(C, align(4)))]
|
||||
#[cfg_attr(target_pointer_width = "64", repr(C, align(8)))]
|
||||
|
@ -1458,6 +1459,7 @@ macro_rules! atomic_int {
|
|||
$stable_nand:meta,
|
||||
$const_stable:meta,
|
||||
$stable_init_const:meta,
|
||||
$diagnostic_item:meta,
|
||||
$s_int_type:literal,
|
||||
$extra_feature:expr,
|
||||
$min_fn:ident, $max_fn:ident,
|
||||
|
@ -1480,6 +1482,7 @@ macro_rules! atomic_int {
|
|||
///
|
||||
/// [module-level documentation]: crate::sync::atomic
|
||||
#[$stable]
|
||||
#[$diagnostic_item]
|
||||
#[repr(C, align($align))]
|
||||
pub struct $atomic_type {
|
||||
v: UnsafeCell<$int_type>,
|
||||
|
@ -2306,6 +2309,7 @@ atomic_int! {
|
|||
stable(feature = "integer_atomics_stable", since = "1.34.0"),
|
||||
rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
||||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicI8"),
|
||||
"i8",
|
||||
"",
|
||||
atomic_min, atomic_max,
|
||||
|
@ -2325,6 +2329,7 @@ atomic_int! {
|
|||
stable(feature = "integer_atomics_stable", since = "1.34.0"),
|
||||
rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
||||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicU8"),
|
||||
"u8",
|
||||
"",
|
||||
atomic_umin, atomic_umax,
|
||||
|
@ -2344,6 +2349,7 @@ atomic_int! {
|
|||
stable(feature = "integer_atomics_stable", since = "1.34.0"),
|
||||
rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
||||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicI16"),
|
||||
"i16",
|
||||
"",
|
||||
atomic_min, atomic_max,
|
||||
|
@ -2363,6 +2369,7 @@ atomic_int! {
|
|||
stable(feature = "integer_atomics_stable", since = "1.34.0"),
|
||||
rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
||||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicU16"),
|
||||
"u16",
|
||||
"",
|
||||
atomic_umin, atomic_umax,
|
||||
|
@ -2382,6 +2389,7 @@ atomic_int! {
|
|||
stable(feature = "integer_atomics_stable", since = "1.34.0"),
|
||||
rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
||||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicI32"),
|
||||
"i32",
|
||||
"",
|
||||
atomic_min, atomic_max,
|
||||
|
@ -2401,6 +2409,7 @@ atomic_int! {
|
|||
stable(feature = "integer_atomics_stable", since = "1.34.0"),
|
||||
rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
||||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicU32"),
|
||||
"u32",
|
||||
"",
|
||||
atomic_umin, atomic_umax,
|
||||
|
@ -2420,6 +2429,7 @@ atomic_int! {
|
|||
stable(feature = "integer_atomics_stable", since = "1.34.0"),
|
||||
rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
||||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicI64"),
|
||||
"i64",
|
||||
"",
|
||||
atomic_min, atomic_max,
|
||||
|
@ -2439,6 +2449,7 @@ atomic_int! {
|
|||
stable(feature = "integer_atomics_stable", since = "1.34.0"),
|
||||
rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
||||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicU64"),
|
||||
"u64",
|
||||
"",
|
||||
atomic_umin, atomic_umax,
|
||||
|
@ -2458,6 +2469,7 @@ atomic_int! {
|
|||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
||||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicI128"),
|
||||
"i128",
|
||||
"#![feature(integer_atomics)]\n\n",
|
||||
atomic_min, atomic_max,
|
||||
|
@ -2477,6 +2489,7 @@ atomic_int! {
|
|||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
||||
unstable(feature = "integer_atomics", issue = "32976"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicU128"),
|
||||
"u128",
|
||||
"#![feature(integer_atomics)]\n\n",
|
||||
atomic_umin, atomic_umax,
|
||||
|
@ -2500,6 +2513,7 @@ macro_rules! atomic_int_ptr_sized {
|
|||
stable(feature = "atomic_nand", since = "1.27.0"),
|
||||
rustc_const_stable(feature = "const_ptr_sized_atomics", since = "1.24.0"),
|
||||
stable(feature = "rust1", since = "1.0.0"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicIsize"),
|
||||
"isize",
|
||||
"",
|
||||
atomic_min, atomic_max,
|
||||
|
@ -2520,6 +2534,7 @@ macro_rules! atomic_int_ptr_sized {
|
|||
stable(feature = "atomic_nand", since = "1.27.0"),
|
||||
rustc_const_stable(feature = "const_ptr_sized_atomics", since = "1.24.0"),
|
||||
stable(feature = "rust1", since = "1.0.0"),
|
||||
cfg_attr(not(test), rustc_diagnostic_item = "AtomicUsize"),
|
||||
"usize",
|
||||
"",
|
||||
atomic_umin, atomic_umax,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue