Fix comment about rustc_inherit_overflow_checks in abs().
This commit is contained in:
parent
8daad743c4
commit
13bfbb4253
@ -1772,9 +1772,9 @@ pub const fn rem_euclid(self, rhs: Self) -> Self {
|
||||
#[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 {
|
||||
|
Loading…
Reference in New Issue
Block a user