diff options
| author | Nurzhan Saken <nurzhan.sakenov@gmail.com> | 2025-07-01 22:32:19 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-01 22:32:19 +0400 |
| commit | 79ed7c1f415f40b3167d946c4a292b84b92eede5 (patch) | |
| tree | 75ea3e984a050c9ab3f75d01c68d919681efb298 | |
| parent | c42b1773feb5808ae870f8b578a4a8601c7bd322 (diff) | |
| download | rust-79ed7c1f415f40b3167d946c4a292b84b92eede5.tar.gz rust-79ed7c1f415f40b3167d946c4a292b84b92eede5.zip | |
Test upper overflow in `strict_sub_signed`
Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
| -rw-r--r-- | library/core/src/num/uint_macros.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index cf34ab8a3cd..78002593b63 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -830,7 +830,7 @@ macro_rules! uint_impl { /// /// ```should_panic /// #![feature(strict_overflow_ops)] - #[doc = concat!("let _ = (", stringify!($SelfT), "::MIN + 2).strict_sub_signed(3);")] + #[doc = concat!("let _ = (", stringify!($SelfT), "::MAX).strict_sub_signed(-1);")] /// ``` #[unstable(feature = "strict_overflow_ops", issue = "118260")] #[must_use = "this returns the result of the operation, \ |
