Re-add comment about behaviour of inline.
This commit is contained in:
parent
760ce94c69
commit
525cd2d7c1
1 changed files with 3 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue