Skip to content

Commit

Permalink
Rollup merge of rust-lang#86367 - m-ou-se:fix-abs-comment, r=scottmcm
Browse files Browse the repository at this point in the history
Fix comment about rustc_inherit_overflow_checks in abs().
  • Loading branch information
JohnTitor authored Jun 21, 2021
2 parents 2706138 + 13bfbb4 commit 4706e45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4706e45

Please sign in to comment.