From 02ac46c0c207676e2096c31b254dd77c4ebcefa5 Mon Sep 17 00:00:00 2001 From: Gurinder Singh Date: Sat, 20 Apr 2024 10:18:47 +0530 Subject: [PATCH] Suggest using `unsigned_abs` in `abs` documentation --- library/core/src/num/int_macros.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index e34e9b7fff644..f88a4ed772c2f 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -3185,7 +3185,8 @@ macro_rules! int_impl { /// that code in debug mode will trigger a panic on this case and /// optimized code will return #[doc = concat!("`", stringify!($SelfT), "::MIN`")] - /// without a panic. + /// without a panic. If you do not want this behavior consider + /// using [`unsigned_abs`](Self::unsigned_abs) instead. /// /// # Examples ///