Rollup merge of #67845 - jumbatm:also-unconst-hack-abs, r=oli-obk

Also remove const-hack for abs

Closes #67842.

r? @oli-obk
This commit is contained in:
Dylan DPC 2020-01-05 22:44:30 +05:30 committed by GitHub
commit 59f8ba3a4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {