rust/patches/0002-Disable-u128-and-i128-in-libcore.patch

113 lines
4.6 KiB
Diff
Raw Normal View History

From e87977477e8507a5749e64ea49ee503e706d7178 Mon Sep 17 00:00:00 2001
2018-07-18 12:25:01 +02:00
From: bjorn3 <bjorn3@users.noreply.github.com>
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
---
src/libcore/sync/atomic.rs | 32 --------
src/libcore/time.rs | 123 -------------------------------
src/libstd/num.rs | 2 +-
src/libstd/panic.rs | 6 --
20 files changed, 63 insertions(+), 363 deletions(-)
2018-07-18 12:25:01 +02: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`.
///
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 }
diff --git a/src/libstd/num.rs b/src/libstd/num.rs
index 828d572..bc04fb1 100644
--- 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;
#[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};
#[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};
#[cfg(test)] use crate::fmt;
#[cfg(test)] use crate::ops::{Add, Sub, Mul, Div, Rem};
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs
index 6a16414..f027102 100644
--- 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 {}
#[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 {}
#[cfg(target_has_atomic = "8")]
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
--
2.17.2 (Apple Git-113)