Skip to content

Commit 1f20a2b

Browse files
committed
derive kani::Arbitrary for Wrapping and Saturating types
1 parent 3f4234a commit 1f20a2b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

library/core/src/num/saturating.rs

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ use crate::ops::{
3535
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Hash)]
3636
#[repr(transparent)]
3737
#[rustc_diagnostic_item = "Saturating"]
38+
#[cfg_attr(kani, derive(kani::Arbitrary))]
3839
pub struct Saturating<T>(#[stable(feature = "saturating_int_impl", since = "1.74.0")] pub T);
3940

4041
#[stable(feature = "saturating_int_impl", since = "1.74.0")]

library/core/src/num/wrapping.rs

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ use crate::ops::{
4040
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Hash)]
4141
#[repr(transparent)]
4242
#[rustc_diagnostic_item = "Wrapping"]
43+
#[cfg_attr(kani, derive(kani::Arbitrary))]
4344
pub struct Wrapping<T>(#[stable(feature = "rust1", since = "1.0.0")] pub T);
4445

4546
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)