Skip to content

Commit

Permalink
Re-add comment about behaviour of inline.
Browse files Browse the repository at this point in the history
  • Loading branch information
jumbatm committed Jan 4, 2020
1 parent 760ce94 commit 525cd2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2001,6 +2001,9 @@ $EndFeature, "
#[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.
if self.is_negative() {
-self
} else {
Expand Down

0 comments on commit 525cd2d

Please sign in to comment.