rust/0005-Disable-some-more-unsupported-stuff-in-libcore.patch
2018-09-16 15:28:27 +02:00

68 lines
2.2 KiB
Diff

From 3d1907db6e349aa7e6cfe3dd490a9d10db669872 Mon Sep 17 00:00:00 2001
From: bjorn3 <bjorn3@users.noreply.github.com>
Date: Thu, 23 Aug 2018 11:15:01 +0200
Subject: [PATCH] Disable some more unsupported stuff in libcore
---
src/libcore/cmp.rs | 5 ++++-
src/libcore/num/mod.rs | 8 ++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index a6e6496..f9374ea 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -496,6 +496,7 @@ pub trait Ord: Eq + PartialOrd<Self> {
#[stable(feature = "rust1", since = "1.0.0")]
impl Eq for Ordering {}
+/*
#[stable(feature = "rust1", since = "1.0.0")]
impl Ord for Ordering {
#[inline]
@@ -503,12 +504,14 @@ impl Ord for Ordering {
(*self as i32).cmp(&(*other as i32))
}
}
+*/
#[stable(feature = "rust1", since = "1.0.0")]
impl PartialOrd for Ordering {
#[inline]
fn partial_cmp(&self, other: &Ordering) -> Option<Ordering> {
- (*self as i32).partial_cmp(&(*other as i32))
+ //(*self as i32).partial_cmp(&(*other as i32))
+ None
}
}
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index 5d00949..f077f1d 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -2273,7 +2273,9 @@ assert_eq!(m, ", $swapped, ");
#[rustc_const_unstable(feature = "const_int_ops")]
#[inline]
pub const fn swap_bytes(self) -> Self {
- unsafe { intrinsics::bswap(self as $ActualT) as Self }
+ // TODO support bswap
+ //unsafe { intrinsics::bswap(self as $ActualT) as Self }
+ 0
}
}
@@ -2295,7 +2297,9 @@ assert_eq!(m, ", $reversed, ");
#[unstable(feature = "reverse_bits", issue = "48763")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
#[cfg(not(stage0))]
pub const fn reverse_bits(self) -> Self {
- unsafe { intrinsics::bitreverse(self as $ActualT) as Self }
+ // TODO support bitreverse
+ //unsafe { intrinsics::bitreverse(self as $ActualT) as Self }
+ 0
}
}
--
2.11.0