diff --git a/.github/workflows/kani.yml b/.github/workflows/kani.yml index d93b0ecc26b16..18bcf78e6c630 100644 --- a/.github/workflows/kani.yml +++ b/.github/workflows/kani.yml @@ -151,6 +151,12 @@ jobs: --include-pattern "num::::unchecked_add" \ --include-pattern "num::::unchecked_add" \ --include-pattern "num::::unchecked_add" \ + --include-pattern "num::::unchecked_funnel_sh" \ + --include-pattern "num::::unchecked_funnel_sh" \ + --include-pattern "num::::unchecked_funnel_sh" \ + --include-pattern "num::::unchecked_funnel_sh" \ + --include-pattern "num::::unchecked_funnel_sh" \ + --include-pattern "num::::unchecked_funnel_sh" \ --include-pattern "num::::unchecked_neg" \ --include-pattern "num::::unchecked_neg" \ --include-pattern "num::::unchecked_neg" \ diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index f08a6c020faa6..93c35a5c7da0f 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -729,6 +729,7 @@ macro_rules! uint_impl { #[must_use = "this returns the result of the operation, without modifying the original"] #[inline(always)] #[track_caller] + #[requires(n < <$ActualT>::BITS)] pub const unsafe fn unchecked_funnel_shl(self, right: Self, n: u32) -> Self { assert_unsafe_precondition!( check_language_ub, @@ -756,6 +757,7 @@ macro_rules! uint_impl { #[must_use = "this returns the result of the operation, without modifying the original"] #[inline(always)] #[track_caller] + #[requires(n < <$ActualT>::BITS)] pub const unsafe fn unchecked_funnel_shr(self, right: Self, n: u32) -> Self { assert_unsafe_precondition!( check_language_ub,