about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-06-22 07:37:51 +0900
committerGitHub <noreply@github.com>2021-06-22 07:37:51 +0900
commit8389cd3a1a085a95e1d65de1bd3b11dedd85e8ed (patch)
tree018ca22860583789e0e5603865454abaa052935d
parent83d9b1bb02a22dd85f1eebe4f180cf479d982ec6 (diff)
parent13bfbb42530321e528bd10e5301ba83db8973b8f (diff)
downloadrust-8389cd3a1a085a95e1d65de1bd3b11dedd85e8ed.tar.gz
rust-8389cd3a1a085a95e1d65de1bd3b11dedd85e8ed.zip
Rollup merge of #86367 - m-ou-se:fix-abs-comment, r=scottmcm
Fix comment about rustc_inherit_overflow_checks in abs().
-rw-r--r--library/core/src/num/int_macros.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs
index a0efe681285..2e466106fe5 100644
--- a/library/core/src/num/int_macros.rs
+++ b/library/core/src/num/int_macros.rs
@@ -1772,9 +1772,9 @@ macro_rules! int_impl {
         #[inline]
         #[rustc_inherit_overflow_checks]
         pub const fn abs(self) -> Self {
-            // Note that the #[inline] above means that the overflow
-            // semantics of the subtraction depend on the crate we're being
-            // inlined into.
+            // Note that the #[rustc_inherit_overflow_checks] and #[inline]
+            // above mean that the overflow semantics of the subtraction
+            // depend on the crate we're being called from.
             if self.is_negative() {
                 -self
             } else {