Skip to content

Commit 525cd2d

Browse files
committed
Re-add comment about behaviour of inline.
1 parent 760ce94 commit 525cd2d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libcore/num/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -2001,6 +2001,9 @@ $EndFeature, "
20012001
#[inline]
20022002
#[rustc_inherit_overflow_checks]
20032003
pub const fn abs(self) -> Self {
2004+
// Note that the #[inline] above means that the overflow
2005+
// semantics of the subtraction depend on the crate we're being
2006+
// inlined into.
20042007
if self.is_negative() {
20052008
-self
20062009
} else {

0 commit comments

Comments
 (0)