2019-03-01 18:55:20 +01:00
|
|
|
From e87977477e8507a5749e64ea49ee503e706d7178 Mon Sep 17 00:00:00 2001
|
2018-07-18 12:25:01 +02:00
|
|
|
From: bjorn3 <bjorn3@users.noreply.github.com>
|
2019-03-01 18:55:20 +01:00
|
|
|
Date: Fri, 1 Mar 2019 18:36:21 +0100
|
2018-07-18 12:25:01 +02:00
|
|
|
Subject: [PATCH] Disable u128 and i128 in libcore
|
|
|
|
|
|
|
|
---
|
2019-02-24 12:37:44 +01:00
|
|
|
src/libcore/sync/atomic.rs | 32 --------
|
2019-02-16 12:35:45 +01:00
|
|
|
src/libcore/time.rs | 123 -------------------------------
|
2019-01-29 20:28:04 +01:00
|
|
|
src/libstd/num.rs | 2 +-
|
|
|
|
src/libstd/panic.rs | 6 --
|
2019-02-24 12:37:44 +01:00
|
|
|
20 files changed, 63 insertions(+), 363 deletions(-)
|
2018-07-18 12:25:01 +02:00
|
|
|
|
2019-03-30 10:37:09 +01:00
|
|
|
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
|
|
|
|
index 6b657b1..5add3f3 100644
|
|
|
|
--- a/src/libcore/num/mod.rs
|
|
|
|
+++ b/src/libcore/num/mod.rs
|
|
|
|
@@ -127,8 +127,8 @@ macro_rules! from_str_radix_nzint_impl {
|
|
|
|
)*}
|
|
|
|
}
|
|
|
|
|
|
|
|
-from_str_radix_nzint_impl! { NonZeroU8 NonZeroU16 NonZeroU32 NonZeroU64 NonZeroU128 NonZeroUsize
|
|
|
|
- NonZeroI8 NonZeroI16 NonZeroI32 NonZeroI64 NonZeroI128 NonZeroIsize }
|
|
|
|
+from_str_radix_nzint_impl! { NonZeroU8 NonZeroU16 NonZeroU32 NonZeroU64 NonZeroUsize
|
|
|
|
+ NonZeroI8 NonZeroI16 NonZeroI32 NonZeroI64 NonZeroIsize }
|
|
|
|
|
|
|
|
/// Provides intentionally-wrapped arithmetic on `T`.
|
|
|
|
///
|
2019-02-24 12:37:44 +01:00
|
|
|
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs
|
|
|
|
index d0ee5fa..d02c454 100644
|
|
|
|
--- a/src/libcore/sync/atomic.rs
|
|
|
|
+++ b/src/libcore/sync/atomic.rs
|
|
|
|
@@ -2012,38 +2012,6 @@ atomic_int! {
|
|
|
|
"AtomicU64::new(0)",
|
|
|
|
u64 AtomicU64 ATOMIC_U64_INIT
|
|
|
|
}
|
|
|
|
-#[cfg(target_has_atomic = "128")]
|
|
|
|
-atomic_int! {
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- "i128", "../../../std/primitive.i128.html",
|
|
|
|
- "#![feature(integer_atomics)]\n\n",
|
|
|
|
- atomic_min, atomic_max,
|
|
|
|
- 16,
|
|
|
|
- "AtomicI128::new(0)",
|
|
|
|
- i128 AtomicI128 ATOMIC_I128_INIT
|
|
|
|
-}
|
|
|
|
-#[cfg(target_has_atomic = "128")]
|
|
|
|
-atomic_int! {
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- "u128", "../../../std/primitive.u128.html",
|
|
|
|
- "#![feature(integer_atomics)]\n\n",
|
|
|
|
- atomic_umin, atomic_umax,
|
|
|
|
- 16,
|
|
|
|
- "AtomicU128::new(0)",
|
|
|
|
- u128 AtomicU128 ATOMIC_U128_INIT
|
|
|
|
-}
|
|
|
|
#[cfg(target_pointer_width = "16")]
|
|
|
|
macro_rules! ptr_width {
|
|
|
|
() => { 2 }
|
2018-12-28 10:44:32 +01:00
|
|
|
diff --git a/src/libstd/num.rs b/src/libstd/num.rs
|
2019-03-01 18:55:20 +01:00
|
|
|
index 828d572..bc04fb1 100644
|
2018-12-28 10:44:32 +01:00
|
|
|
--- a/src/libstd/num.rs
|
|
|
|
+++ b/src/libstd/num.rs
|
|
|
|
@@ -12,7 +12,7 @@ pub use core::num::{FpCategory, ParseIntError, ParseFloatError, TryFromIntError}
|
|
|
|
pub use core::num::Wrapping;
|
2019-01-26 11:59:34 +01:00
|
|
|
|
2018-12-28 10:44:32 +01:00
|
|
|
#[stable(feature = "nonzero", since = "1.28.0")]
|
|
|
|
-pub use core::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, NonZeroUsize};
|
|
|
|
+pub use core::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroUsize};
|
2019-04-15 16:34:16 +02:00
|
|
|
#[stable(feature = "signed_nonzero", since = "1.34.0")]
|
|
|
|
-pub use core::num::{NonZeroI8, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI128, NonZeroIsize};
|
|
|
|
+pub use core::num::{NonZeroI8, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroIsize};
|
2019-01-26 11:59:34 +01:00
|
|
|
|
2019-03-01 18:55:20 +01:00
|
|
|
#[cfg(test)] use crate::fmt;
|
|
|
|
#[cfg(test)] use crate::ops::{Add, Sub, Mul, Div, Rem};
|
2018-12-28 10:44:32 +01:00
|
|
|
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs
|
2019-03-01 18:55:20 +01:00
|
|
|
index 6a16414..f027102 100644
|
2018-12-28 10:44:32 +01:00
|
|
|
--- a/src/libstd/panic.rs
|
|
|
|
+++ b/src/libstd/panic.rs
|
|
|
|
@@ -254,9 +254,6 @@ impl RefUnwindSafe for atomic::AtomicI32 {}
|
|
|
|
#[cfg(target_has_atomic = "64")]
|
|
|
|
#[unstable(feature = "integer_atomics", issue = "32976")]
|
|
|
|
impl RefUnwindSafe for atomic::AtomicI64 {}
|
|
|
|
-#[cfg(target_has_atomic = "128")]
|
|
|
|
-#[unstable(feature = "integer_atomics", issue = "32976")]
|
|
|
|
-impl RefUnwindSafe for atomic::AtomicI128 {}
|
2019-01-26 11:59:34 +01:00
|
|
|
|
2018-12-28 10:44:32 +01:00
|
|
|
#[cfg(target_has_atomic = "ptr")]
|
|
|
|
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
|
|
|
|
@@ -273,9 +270,6 @@ impl RefUnwindSafe for atomic::AtomicU32 {}
|
|
|
|
#[cfg(target_has_atomic = "64")]
|
|
|
|
#[unstable(feature = "integer_atomics", issue = "32976")]
|
|
|
|
impl RefUnwindSafe for atomic::AtomicU64 {}
|
|
|
|
-#[cfg(target_has_atomic = "128")]
|
|
|
|
-#[unstable(feature = "integer_atomics", issue = "32976")]
|
|
|
|
-impl RefUnwindSafe for atomic::AtomicU128 {}
|
2019-01-26 11:59:34 +01:00
|
|
|
|
2018-12-28 10:44:32 +01:00
|
|
|
#[cfg(target_has_atomic = "8")]
|
|
|
|
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
|
2019-01-26 11:59:34 +01:00
|
|
|
--
|
2019-02-16 12:35:45 +01:00
|
|
|
2.17.2 (Apple Git-113)
|