]> git.lizzy.rs Git - rust.git/commitdiff
Rustup to rustc 1.34.0-nightly (b244f61b7 2019-02-12)
authorbjorn3 <bjorn3@users.noreply.github.com>
Wed, 13 Feb 2019 13:55:09 +0000 (14:55 +0100)
committerbjorn3 <bjorn3@users.noreply.github.com>
Wed, 13 Feb 2019 13:55:09 +0000 (14:55 +0100)
patches/0002-Disable-u128-and-i128-in-libcore.patch
patches/0009-Workaround-missing-saturating_-add-sub-intrinsic-imp.patch [new file with mode: 0644]
patches/0009-Workaround-missing-saturating_sub-intrinsic-impl.patch [deleted file]

index 16dcacacb48577856c7ca1050e1badf6da262a46..ab41edd6ed52b80fa618ded1c77917792c575020 100644 (file)
@@ -1,6 +1,6 @@
-From d723688cb9f94c7c90617eb96b1d64fd968a02c3 Mon Sep 17 00:00:00 2001
+From 1119ae3f160d7e89064583f1d9d6685bc2e6928b Mon Sep 17 00:00:00 2001
 From: bjorn3 <bjorn3@users.noreply.github.com>
-Date: Sat, 2 Feb 2019 11:30:28 +0100
+Date: Wed, 13 Feb 2019 14:37:22 +0100
 Subject: [PATCH] Disable u128 and i128 in libcore
 
 ---
@@ -44,7 +44,7 @@ index ed90b7d..1739f91 100644
          bool char
      }
 diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
-index d43a5c1..268e5f1 100644
+index 81fcdee..749134c 100644
 --- a/src/libcore/cmp.rs
 +++ b/src/libcore/cmp.rs
 @@ -876,7 +876,7 @@ mod impls {
@@ -75,7 +75,7 @@ index d43a5c1..268e5f1 100644
      #[unstable(feature = "never_type", issue = "35121")]
      impl PartialEq for ! {
 diff --git a/src/libcore/default.rs b/src/libcore/default.rs
-index 0e47c2f..570b949 100644
+index 5ad05b3..1b5a1d1 100644
 --- a/src/libcore/default.rs
 +++ b/src/libcore/default.rs
 @@ -135,14 +135,12 @@ default_impl! { u8, 0, "Returns the default value of `0`" }
@@ -193,7 +193,7 @@ index d5d29c9..f98f382 100644
  
      #[stable(feature = "rust1", since = "1.0.0")]
 diff --git a/src/libcore/iter/range.rs b/src/libcore/iter/range.rs
-index 66c09a0..1b8c5c9 100644
+index a3e9cfa..31b6ca4 100644
 --- a/src/libcore/iter/range.rs
 +++ b/src/libcore/iter/range.rs
 @@ -173,7 +173,6 @@ step_impl_signed!([i64: u64]);
@@ -218,10 +218,10 @@ index dfe1d2a..06cc578 100644
  
  /// An iterator adapter that produces output as long as the underlying
 diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
-index 97b07aa..9e1e9a6 100644
+index 9b37104..787b10b 100644
 --- a/src/libcore/lib.rs
 +++ b/src/libcore/lib.rs
-@@ -149,14 +149,12 @@ mod uint_macros;
+@@ -147,14 +147,12 @@ mod uint_macros;
  #[path = "num/i16.rs"]   pub mod i16;
  #[path = "num/i32.rs"]   pub mod i32;
  #[path = "num/i64.rs"]   pub mod i64;
@@ -252,10 +252,10 @@ index 457d556..91425fb 100644
          bool char
      }
 diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs
-index 8b6d9d8..8023dc1 100644
+index 2a493e8..a7dba54 100644
 --- a/src/libcore/mem.rs
 +++ b/src/libcore/mem.rs
-@@ -163,12 +163,10 @@ pub fn forget_unsized<T: ?Sized>(t: T) {
+@@ -164,12 +164,10 @@ pub fn forget_unsized<T: ?Sized>(t: T) {
  /// u16 | 2
  /// u32 | 4
  /// u64 | 8
@@ -269,7 +269,7 @@ index 8b6d9d8..8023dc1 100644
  /// f64 | 8
  /// char | 4
 diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
-index f80f839..eed1241 100644
+index 6fb67ea..6440490 100644
 --- a/src/libcore/num/mod.rs
 +++ b/src/libcore/num/mod.rs
 @@ -102,13 +102,11 @@ nonzero_integers! {
@@ -286,7 +286,7 @@ index f80f839..eed1241 100644
      #[stable(feature = "signed_nonzero", since = "1.34.0")] NonZeroIsize(isize);
  }
  
-@@ -2084,18 +2082,6 @@ impl i64 {
+@@ -2124,18 +2122,6 @@ impl i64 {
           "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]" }
  }
  
@@ -305,7 +305,7 @@ index f80f839..eed1241 100644
  #[cfg(target_pointer_width = "16")]
  #[lang = "isize"]
  impl isize {
-@@ -4336,17 +4322,6 @@ impl u64 {
+@@ -4411,17 +4397,6 @@ impl u64 {
          "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]" }
  }
  
@@ -323,7 +323,7 @@ index f80f839..eed1241 100644
  #[cfg(target_pointer_width = "16")]
  #[lang = "usize"]
  impl usize {
-@@ -4430,7 +4405,7 @@ macro_rules! from_str_radix_int_impl {
+@@ -4505,7 +4480,7 @@ macro_rules! from_str_radix_int_impl {
          }
      )*}
  }
@@ -332,7 +332,7 @@ index f80f839..eed1241 100644
  
  /// The error type returned when a checked integral type conversion fails.
  #[unstable(feature = "try_from", issue = "33417")]
-@@ -4546,30 +4521,25 @@ macro_rules! rev {
+@@ -4621,30 +4596,25 @@ macro_rules! rev {
  try_from_upper_bounded!(u16, u8);
  try_from_upper_bounded!(u32, u16, u8);
  try_from_upper_bounded!(u64, u32, u16, u8);
@@ -367,7 +367,7 @@ index f80f839..eed1241 100644
  
  // usize/isize
  try_from_upper_bounded!(usize, isize);
-@@ -4581,21 +4551,21 @@ mod ptr_try_from_impls {
+@@ -4656,21 +4626,21 @@ mod ptr_try_from_impls {
      use convert::TryFrom;
  
      try_from_upper_bounded!(usize, u8);
@@ -397,7 +397,7 @@ index f80f839..eed1241 100644
  }
  
  #[cfg(target_pointer_width = "32")]
-@@ -4604,24 +4574,24 @@ mod ptr_try_from_impls {
+@@ -4679,24 +4649,24 @@ mod ptr_try_from_impls {
      use convert::TryFrom;
  
      try_from_upper_bounded!(usize, u8, u16);
@@ -430,7 +430,7 @@ index f80f839..eed1241 100644
  }
  
  #[cfg(target_pointer_width = "64")]
-@@ -4630,24 +4600,20 @@ mod ptr_try_from_impls {
+@@ -4705,24 +4675,20 @@ mod ptr_try_from_impls {
      use convert::TryFrom;
  
      try_from_upper_bounded!(usize, u8, u16, u32);
@@ -459,7 +459,7 @@ index f80f839..eed1241 100644
  }
  
  #[doc(hidden)]
-@@ -4682,7 +4648,7 @@ macro_rules! doit {
+@@ -4757,7 +4723,7 @@ macro_rules! doit {
          }
      })*)
  }
@@ -468,7 +468,7 @@ index f80f839..eed1241 100644
  
  fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, ParseIntError> {
      use self::IntErrorKind::*;
-@@ -4873,52 +4839,38 @@ impl_from_bool! { u8, #[stable(feature = "from_bool", since = "1.28.0")] }
+@@ -4948,52 +4914,38 @@ impl_from_bool! { u8, #[stable(feature = "from_bool", since = "1.28.0")] }
  impl_from_bool! { u16, #[stable(feature = "from_bool", since = "1.28.0")] }
  impl_from_bool! { u32, #[stable(feature = "from_bool", since = "1.28.0")] }
  impl_from_bool! { u64, #[stable(feature = "from_bool", since = "1.28.0")] }
@@ -597,7 +597,7 @@ index 50e189c..2da3b35 100644
      pub use self::platform::usize;
  }
 diff --git a/src/libcore/ops/arith.rs b/src/libcore/ops/arith.rs
-index 7d8bf18..91fd879 100644
+index 0252ede..cb8ab3d 100644
 --- a/src/libcore/ops/arith.rs
 +++ b/src/libcore/ops/arith.rs
 @@ -104,7 +104,7 @@ macro_rules! add_impl {
@@ -886,10 +886,10 @@ index 8c5dde7..8122120 100644
  macro_rules! ptr_width {
      () => { 2 }
 diff --git a/src/libcore/tests/iter.rs b/src/libcore/tests/iter.rs
-index 0fa9974..75b44b1 100644
+index 51a6017..e6631db 100644
 --- a/src/libcore/tests/iter.rs
 +++ b/src/libcore/tests/iter.rs
-@@ -215,8 +215,6 @@ fn test_iterator_step_by_nth_overflow() {
+@@ -217,8 +217,6 @@ fn test_iterator_step_by_nth_overflow() {
      type Bigger = u32;
      #[cfg(target_pointer_width = "32")]
      type Bigger = u64;
@@ -898,7 +898,7 @@ index 0fa9974..75b44b1 100644
  
      #[derive(Clone)]
      struct Test(Bigger);
-@@ -1969,19 +1967,6 @@ fn test_step_replace_signed() {
+@@ -1977,19 +1975,6 @@ fn test_step_replace_signed() {
  }
  
  #[test]
@@ -919,10 +919,10 @@ index 0fa9974..75b44b1 100644
      let f = &|acc, x| i32::checked_add(2*acc, x);
      assert_eq!((1..10).rev().try_fold(7, f), (1..10).try_rfold(7, f));
 diff --git a/src/libcore/tests/num/mod.rs b/src/libcore/tests/num/mod.rs
-index a17c094..3c36d10 100644
+index ab638e0..4a2aa4c 100644
 --- a/src/libcore/tests/num/mod.rs
 +++ b/src/libcore/tests/num/mod.rs
-@@ -178,12 +178,10 @@ test_impl_from! { test_boolu8, bool, u8 }
+@@ -180,12 +180,10 @@ test_impl_from! { test_boolu8, bool, u8 }
  test_impl_from! { test_boolu16, bool, u16 }
  test_impl_from! { test_boolu32, bool, u32 }
  test_impl_from! { test_boolu64, bool, u64 }
@@ -935,7 +935,7 @@ index a17c094..3c36d10 100644
  
  // Signed -> Float
  test_impl_from! { test_i8f32, i8, f32 }
-@@ -265,51 +263,35 @@ test_impl_try_from_always_ok! { test_try_u8u8, u8, u8 }
+@@ -267,51 +265,35 @@ test_impl_try_from_always_ok! { test_try_u8u8, u8, u8 }
  test_impl_try_from_always_ok! { test_try_u8u16, u8, u16 }
  test_impl_try_from_always_ok! { test_try_u8u32, u8, u32 }
  test_impl_try_from_always_ok! { test_try_u8u64, u8, u64 }
@@ -988,7 +988,7 @@ index a17c094..3c36d10 100644
  test_impl_try_from_always_ok! { test_try_usizeusize, usize, usize }
  test_impl_try_from_always_ok! { test_try_isizeisize, isize, isize }
 diff --git a/src/libcore/time.rs b/src/libcore/time.rs
-index a751965..5d162cb 100644
+index ac7e117..0dfd856 100644
 --- a/src/libcore/time.rs
 +++ b/src/libcore/time.rs
 @@ -21,7 +21,6 @@ const NANOS_PER_MILLI: u32 = 1_000_000;
@@ -1091,7 +1091,7 @@ index a751965..5d162cb 100644
 -        }
 -    }
 -
--    /// Multiply `Duration` by `f64`.
+-    /// Multiplies `Duration` by `f64`.
 -    ///
 -    /// # Panics
 -    /// This method will panic if result is not finite, negative or overflows `Duration`.
@@ -1136,10 +1136,10 @@ index a751965..5d162cb 100644
      ///
      /// # Examples
 diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
-index f269fda..07c3680 100644
+index 3c358dc..2dd5699 100644
 --- a/src/libstd/lib.rs
 +++ b/src/libstd/lib.rs
-@@ -397,8 +397,6 @@ pub use core::i16;
+@@ -395,8 +395,6 @@ pub use core::i16;
  pub use core::i32;
  #[stable(feature = "rust1", since = "1.0.0")]
  pub use core::i64;
@@ -1148,7 +1148,7 @@ index f269fda..07c3680 100644
  #[stable(feature = "rust1", since = "1.0.0")]
  pub use core::usize;
  #[stable(feature = "rust1", since = "1.0.0")]
-@@ -431,8 +429,6 @@ pub use alloc_crate::string;
+@@ -429,8 +427,6 @@ pub use alloc_crate::string;
  pub use alloc_crate::vec;
  #[stable(feature = "rust1", since = "1.0.0")]
  pub use core::char;
@@ -1158,10 +1158,10 @@ index f269fda..07c3680 100644
  pub use core::hint;
  
 diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs
-index f45cd8b..cf5ba85 100644
+index d19cc48..aeae69a 100644
 --- a/src/libstd/net/ip.rs
 +++ b/src/libstd/net/ip.rs
-@@ -1381,26 +1381,6 @@ impl FromInner<c::in6_addr> for Ipv6Addr {
+@@ -1380,26 +1380,6 @@ impl FromInner<c::in6_addr> for Ipv6Addr {
      }
  }
  
diff --git a/patches/0009-Workaround-missing-saturating_-add-sub-intrinsic-imp.patch b/patches/0009-Workaround-missing-saturating_-add-sub-intrinsic-imp.patch
new file mode 100644 (file)
index 0000000..9d6221b
--- /dev/null
@@ -0,0 +1,166 @@
+From a84d00b816c1b771f3990ad5f7ba78981ab9c151 Mon Sep 17 00:00:00 2001
+From: bjorn3 <bjorn3@users.noreply.github.com>
+Date: Wed, 13 Feb 2019 14:54:20 +0100
+Subject: [PATCH] Workaround missing saturating_{add,sub} intrinsic impl
+
+---
+ src/libcore/num/mod.rs | 94 --------------------------------------------------
+ 1 file changed, 94 deletions(-)
+
+diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
+index 4871b2e..5d5cd61 100644
+--- a/src/libcore/num/mod.rs
++++ b/src/libcore/num/mod.rs
+@@ -880,7 +880,6 @@ $EndFeature, "
+ ```"),
+             #[stable(feature = "rust1", since = "1.0.0")]
+             #[inline]
+-            #[cfg(stage0)]
+             pub fn saturating_add(self, rhs: Self) -> Self {
+                 match self.checked_add(rhs) {
+                     Some(x) => x,
+@@ -892,30 +891,6 @@ $EndFeature, "
+         }
+         doc_comment! {
+-            concat!("Saturating integer addition. Computes `self + rhs`, saturating at the numeric
+-bounds instead of overflowing.
+-
+-# Examples
+-
+-Basic usage:
+-
+-```
+-", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_add(1), 101);
+-assert_eq!(", stringify!($SelfT), "::max_value().saturating_add(100), ", stringify!($SelfT),
+-"::max_value());",
+-$EndFeature, "
+-```"),
+-
+-            #[stable(feature = "rust1", since = "1.0.0")]
+-            #[rustc_const_unstable(feature = "const_saturating_int_methods")]
+-            #[inline]
+-            #[cfg(not(stage0))]
+-            pub const fn saturating_add(self, rhs: Self) -> Self {
+-                intrinsics::saturating_add(self, rhs)
+-            }
+-        }
+-
+-        doc_comment! {
+             concat!("Saturating integer subtraction. Computes `self - rhs`, saturating at the
+ numeric bounds instead of overflowing.
+@@ -931,7 +906,6 @@ $EndFeature, "
+ ```"),
+             #[stable(feature = "rust1", since = "1.0.0")]
+             #[inline]
+-            #[cfg(stage0)]
+             pub fn saturating_sub(self, rhs: Self) -> Self {
+                 match self.checked_sub(rhs) {
+                     Some(x) => x,
+@@ -942,29 +916,6 @@ $EndFeature, "
+         }
+         doc_comment! {
+-            concat!("Saturating integer subtraction. Computes `self - rhs`, saturating at the
+-numeric bounds instead of overflowing.
+-
+-# Examples
+-
+-Basic usage:
+-
+-```
+-", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_sub(127), -27);
+-assert_eq!(", stringify!($SelfT), "::min_value().saturating_sub(100), ", stringify!($SelfT),
+-"::min_value());",
+-$EndFeature, "
+-```"),
+-            #[stable(feature = "rust1", since = "1.0.0")]
+-            #[rustc_const_unstable(feature = "const_saturating_int_methods")]
+-            #[inline]
+-            #[cfg(not(stage0))]
+-            pub const fn saturating_sub(self, rhs: Self) -> Self {
+-                intrinsics::saturating_sub(self, rhs)
+-            }
+-        }
+-
+-        doc_comment! {
+             concat!("Saturating integer multiplication. Computes `self * rhs`, saturating at the
+ numeric bounds instead of overflowing.
+@@ -2779,7 +2730,6 @@ assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, "
+ ```"),
+             #[stable(feature = "rust1", since = "1.0.0")]
+             #[inline]
+-            #[cfg(stage0)]
+             pub fn saturating_add(self, rhs: Self) -> Self {
+                 match self.checked_add(rhs) {
+                     Some(x) => x,
+@@ -2789,28 +2739,6 @@ assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, "
+         }
+         doc_comment! {
+-            concat!("Saturating integer addition. Computes `self + rhs`, saturating at
+-the numeric bounds instead of overflowing.
+-
+-# Examples
+-
+-Basic usage:
+-
+-```
+-", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_add(1), 101);
+-assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, "
+-```"),
+-
+-            #[stable(feature = "rust1", since = "1.0.0")]
+-            #[rustc_const_unstable(feature = "const_saturating_int_methods")]
+-            #[inline]
+-            #[cfg(not(stage0))]
+-            pub const fn saturating_add(self, rhs: Self) -> Self {
+-                intrinsics::saturating_add(self, rhs)
+-            }
+-        }
+-
+-        doc_comment! {
+             concat!("Saturating integer subtraction. Computes `self - rhs`, saturating
+ at the numeric bounds instead of overflowing.
+@@ -2824,7 +2752,6 @@ assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);", $EndFeature, "
+ ```"),
+             #[stable(feature = "rust1", since = "1.0.0")]
+             #[inline]
+-            #[cfg(stage0)]
+             pub fn saturating_sub(self, rhs: Self) -> Self {
+                 match self.checked_sub(rhs) {
+                     Some(x) => x,
+@@ -2834,27 +2761,6 @@ assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);", $EndFeature, "
+         }
+         doc_comment! {
+-            concat!("Saturating integer subtraction. Computes `self - rhs`, saturating
+-at the numeric bounds instead of overflowing.
+-
+-# Examples
+-
+-Basic usage:
+-
+-```
+-", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_sub(27), 73);
+-assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);", $EndFeature, "
+-```"),
+-            #[stable(feature = "rust1", since = "1.0.0")]
+-            #[rustc_const_unstable(feature = "const_saturating_int_methods")]
+-            #[inline]
+-            #[cfg(not(stage0))]
+-            pub const fn saturating_sub(self, rhs: Self) -> Self {
+-                intrinsics::saturating_sub(self, rhs)
+-            }
+-        }
+-
+-        doc_comment! {
+             concat!("Saturating integer multiplication. Computes `self * rhs`,
+ saturating at the numeric bounds instead of overflowing.
+-- 
+2.11.0
+
diff --git a/patches/0009-Workaround-missing-saturating_sub-intrinsic-impl.patch b/patches/0009-Workaround-missing-saturating_sub-intrinsic-impl.patch
deleted file mode 100644 (file)
index 36b8f07..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-From 725a1e7b487e32b5f2e90049c8b37fed1a957003 Mon Sep 17 00:00:00 2001
-From: bjorn3 <bjorn3@users.noreply.github.com>
-Date: Sat, 2 Feb 2019 11:39:22 +0100
-Subject: [PATCH] Workaround missing saturating_sub intrinsic impl
-
----
- src/libcore/num/mod.rs | 20 --------------------
- 1 file changed, 20 deletions(-)
-
-diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
-index eed1241..f928d40 100644
---- a/src/libcore/num/mod.rs
-+++ b/src/libcore/num/mod.rs
-@@ -881,16 +881,11 @@ $EndFeature, "
-             #[stable(feature = "rust1", since = "1.0.0")]
-             #[inline]
-             pub fn saturating_add(self, rhs: Self) -> Self {
--                #[cfg(stage0)]
-                 match self.checked_add(rhs) {
-                     Some(x) => x,
-                     None if rhs >= 0 => Self::max_value(),
-                     None => Self::min_value(),
-                 }
--                #[cfg(not(stage0))]
--                {
--                    intrinsics::saturating_add(self, rhs)
--                }
-             }
-         }
-@@ -911,16 +906,11 @@ $EndFeature, "
-             #[stable(feature = "rust1", since = "1.0.0")]
-             #[inline]
-             pub fn saturating_sub(self, rhs: Self) -> Self {
--                #[cfg(stage0)]
-                 match self.checked_sub(rhs) {
-                     Some(x) => x,
-                     None if rhs >= 0 => Self::min_value(),
-                     None => Self::max_value(),
-                 }
--                #[cfg(not(stage0))]
--                {
--                    intrinsics::saturating_sub(self, rhs)
--                }
-             }
-         }
-@@ -2740,15 +2730,10 @@ assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, "
-             #[stable(feature = "rust1", since = "1.0.0")]
-             #[inline]
-             pub fn saturating_add(self, rhs: Self) -> Self {
--                #[cfg(stage0)]
-                 match self.checked_add(rhs) {
-                     Some(x) => x,
-                     None => Self::max_value(),
-                 }
--                #[cfg(not(stage0))]
--                {
--                    intrinsics::saturating_add(self, rhs)
--                }
-             }
-         }
-@@ -2767,15 +2752,10 @@ assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);", $EndFeature, "
-             #[stable(feature = "rust1", since = "1.0.0")]
-             #[inline]
-             pub fn saturating_sub(self, rhs: Self) -> Self {
--                #[cfg(stage0)]
-                 match self.checked_sub(rhs) {
-                     Some(x) => x,
-                     None => Self::min_value(),
-                 }
--                #[cfg(not(stage0))]
--                {
--                    intrinsics::saturating_sub(self, rhs)
--                }
-             }
-         }
--- 
-2.11.0
-