diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/proptest/src/arbitrary | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/proptest/src/arbitrary')
-rw-r--r-- | vendor/proptest/src/arbitrary/_core/mod.rs | 1 | ||||
-rw-r--r-- | vendor/proptest/src/arbitrary/_core/non_zero.rs (renamed from vendor/proptest/src/arbitrary/non_zero.rs) | 18 | ||||
-rw-r--r-- | vendor/proptest/src/arbitrary/mod.rs | 1 |
3 files changed, 13 insertions, 7 deletions
diff --git a/vendor/proptest/src/arbitrary/_core/mod.rs b/vendor/proptest/src/arbitrary/_core/mod.rs index 5fc3742e4..eb89aa103 100644 --- a/vendor/proptest/src/arbitrary/_core/mod.rs +++ b/vendor/proptest/src/arbitrary/_core/mod.rs @@ -17,6 +17,7 @@ mod fmt; mod iter; mod marker; mod mem; +mod non_zero; mod num; mod option; mod result; diff --git a/vendor/proptest/src/arbitrary/non_zero.rs b/vendor/proptest/src/arbitrary/_core/non_zero.rs index 55a775beb..9e9e3a8be 100644 --- a/vendor/proptest/src/arbitrary/non_zero.rs +++ b/vendor/proptest/src/arbitrary/_core/non_zero.rs @@ -8,15 +8,16 @@ // except according to those terms. use core::convert::TryFrom; +#[cfg(not(target_arch = "wasm32"))] +use core::num::{NonZeroI128, NonZeroU128}; use core::num::{ - NonZeroI128, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, NonZeroIsize, - NonZeroU128, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8, NonZeroUsize, + NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, NonZeroIsize, NonZeroU16, + NonZeroU32, NonZeroU64, NonZeroU8, NonZeroUsize, }; +use crate::arbitrary::{any, Arbitrary, StrategyFor}; use crate::strategy::{FilterMap, Strategy}; -use super::{any, Arbitrary, StrategyFor}; - macro_rules! non_zero_impl { ($nz:ty, $prim:ty) => { impl Arbitrary for $nz { @@ -37,6 +38,7 @@ non_zero_impl!(NonZeroU8, u8); non_zero_impl!(NonZeroU16, u16); non_zero_impl!(NonZeroU32, u32); non_zero_impl!(NonZeroU64, u64); +#[cfg(not(target_arch = "wasm32"))] non_zero_impl!(NonZeroU128, u128); non_zero_impl!(NonZeroUsize, usize); @@ -44,6 +46,7 @@ non_zero_impl!(NonZeroI8, i8); non_zero_impl!(NonZeroI16, i16); non_zero_impl!(NonZeroI32, i32); non_zero_impl!(NonZeroI64, i64); +#[cfg(not(target_arch = "wasm32"))] non_zero_impl!(NonZeroI128, i128); non_zero_impl!(NonZeroIsize, isize); @@ -54,13 +57,16 @@ mod test { u16 => core::num::NonZeroU16, u32 => core::num::NonZeroU32, u64 => core::num::NonZeroU64, - u128 => core::num::NonZeroU128, usize => core::num::NonZeroUsize, i8 => core::num::NonZeroI8, i16 => core::num::NonZeroI16, i32 => core::num::NonZeroI32, i64 => core::num::NonZeroI64, - i128 => core::num::NonZeroI128, isize => core::num::NonZeroIsize ); + #[cfg(not(target_arch = "wasm32"))] + no_panic_test!( + u128 => core::num::NonZeroU128, + i128 => core::num::NonZeroI128 + ); } diff --git a/vendor/proptest/src/arbitrary/mod.rs b/vendor/proptest/src/arbitrary/mod.rs index 51ac48bae..b4175ea5d 100644 --- a/vendor/proptest/src/arbitrary/mod.rs +++ b/vendor/proptest/src/arbitrary/mod.rs @@ -30,7 +30,6 @@ pub mod functor; mod macros; mod arrays; -mod non_zero; mod primitives; mod sample; mod tuples; |