Rollup merge of #86367 - m-ou-se:fix-abs-comment, r=scottmcm

Fix comment about rustc_inherit_overflow_checks in abs().
This commit is contained in:
Yuki Okushi 2021-06-22 07:37:51 +09:00 committed by GitHub
commit 8389cd3a1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {