Skip to content

Commit 79ed7c1

Browse files
nxsakenzachs18
andauthored
Test upper overflow in strict_sub_signed
Co-authored-by: zachs18 <[email protected]>
1 parent c42b177 commit 79ed7c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/num/uint_macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ macro_rules! uint_impl {
830830
///
831831
/// ```should_panic
832832
/// #![feature(strict_overflow_ops)]
833-
#[doc = concat!("let _ = (", stringify!($SelfT), "::MIN + 2).strict_sub_signed(3);")]
833+
#[doc = concat!("let _ = (", stringify!($SelfT), "::MAX).strict_sub_signed(-1);")]
834834
/// ```
835835
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
836836
#[must_use = "this returns the result of the operation, \

0 commit comments

Comments
 (0)