| 1 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/::atomicrust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/::*; |
| 2 | |
| 3 | #[cfg(target_has_atomic = "8")] |
| 4 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicBoolrust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicBool# => bool); |
| 5 | |
| 6 | #[cfg(target_has_atomic = "8")] |
| 7 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicI8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicI8# => i8); |
| 8 | |
| 9 | #[cfg(target_has_atomic = "16")] |
| 10 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicI16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicI16# => i16); |
| 11 | |
| 12 | #[cfg(target_has_atomic = "32")] |
| 13 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicI32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicI32# => i32); |
| 14 | |
| 15 | #[cfg(target_has_atomic = "64")] |
| 16 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicI64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicI64# => i64); |
| 17 | |
| 18 | #[cfg(target_has_atomic = "ptr")] |
| 19 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicIsizerust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicIsize# => isize); |
| 20 | |
| 21 | #[cfg(target_has_atomic = "8")] |
| 22 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicU8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicU8# => u8); |
| 23 | |
| 24 | #[cfg(target_has_atomic = "16")] |
| 25 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicU16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicU16# => u16); |
| 26 | |
| 27 | #[cfg(target_has_atomic = "32")] |
| 28 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicU32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicU32# => u32); |
| 29 | |
| 30 | #[cfg(target_has_atomic = "64")] |
| 31 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicU64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicU64# => u64); |
| 32 | |
| 33 | #[cfg(target_has_atomic = "ptr")] |
| 34 | forward_implrust-analyzer cargo schemars 1.2.2 json_schema_impls/forward_impl!!(AtomicUsizerust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicUsize# => usize); |
| 35 | |
| 36 | #[cfg(test)] |
| 37 | mod testsrust-analyzer cargo schemars 1.2.2 json_schema_impls/atomic/tests/ { |
| 38 | use superrust-analyzer cargo schemars 1.2.2 json_schema_impls/atomic/::*; |
| 39 | use craterust-analyzer cargo schemars 1.2.2 crate/::schema_forrust-analyzer cargo schemars 1.2.2 macros/schema_for!; |
| 40 | use pretty_assertionsrust-analyzer cargo pretty_assertions 1.4.1 crate/::assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!; |
| 41 | |
| 42 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 43 | fn schema_for_atomicsrust-analyzer cargo schemars 1.2.2 json_schema_impls/atomic/tests/schema_for_atomics().() { |
| 44 | let atomic_schema = schema_forrust-analyzer cargo schemars 1.2.2 macros/schema_for!!(( |
| 45 | AtomicBoolrust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicBool#, |
| 46 | AtomicI8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicI8#, |
| 47 | AtomicI16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicI16#, |
| 48 | AtomicI32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicI32#, |
| 49 | AtomicI64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicI64#, |
| 50 | AtomicIsizerust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicIsize#, |
| 51 | AtomicU8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicU8#, |
| 52 | AtomicU16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicU16#, |
| 53 | AtomicU32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicU32#, |
| 54 | AtomicU64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicU64#, |
| 55 | AtomicUsizerust-analyzer cargo core https://github.com/rust-lang/rust/library/core sync/atomic/AtomicUsize#, |
| 56 | )); |
| 57 | let basic_schema = schema_forrust-analyzer cargo schemars 1.2.2 macros/schema_for!!((bool, i8, i16, i32, i64, isize, u8, u16, u32, u64, usize)); |
| 58 | assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(atomic_schema, basic_schema); |
| 59 | } |
| 60 | } |