2018-08-23 04:00:40 -05:00
|
|
|
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/cell.rs | 6 +++---
|
|
|
|
src/libcore/cmp.rs | 5 ++++-
|
|
|
|
src/libcore/num/mod.rs | 8 ++++++--
|
|
|
|
src/libcore/str/mod.rs | 6 +++---
|
|
|
|
4 files changed, 16 insertions(+), 9 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
|
|
|
|
index 009aba5..2aa76e3 100644
|
|
|
|
--- a/src/libcore/cell.rs
|
|
|
|
+++ b/src/libcore/cell.rs
|
|
|
|
@@ -1532,7 +1532,7 @@ impl<T: CoerceUnsized<U>, U> CoerceUnsized<UnsafeCell<U>> for UnsafeCell<T> {}
|
|
|
|
|
|
|
|
#[allow(unused)]
|
|
|
|
fn assert_coerce_unsized(a: UnsafeCell<&i32>, b: Cell<&i32>, c: RefCell<&i32>) {
|
|
|
|
- let _: UnsafeCell<&dyn Send> = a;
|
|
|
|
- let _: Cell<&dyn Send> = b;
|
|
|
|
- let _: RefCell<&dyn Send> = c;
|
|
|
|
+ //let _: UnsafeCell<&dyn Send> = a;
|
|
|
|
+ //let _: Cell<&dyn Send> = b;
|
|
|
|
+ //let _: RefCell<&dyn Send> = c;
|
|
|
|
}
|
|
|
|
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")]
|
2018-09-04 11:26:49 -05:00
|
|
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
2018-08-23 04:00:40 -05:00
|
|
|
#[inline]
|
2018-09-04 11:26:49 -05:00
|
|
|
#[cfg(not(stage0))]
|
|
|
|
pub const fn reverse_bits(self) -> Self {
|
2018-08-23 04:00:40 -05:00
|
|
|
- unsafe { intrinsics::bitreverse(self as $ActualT) as Self }
|
|
|
|
+ // TODO support bitreverse
|
|
|
|
+ //unsafe { intrinsics::bitreverse(self as $ActualT) as Self }
|
|
|
|
+ 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
|
|
|
|
index 810d19d..4c68370 100644
|
|
|
|
--- a/src/libcore/str/mod.rs
|
|
|
|
+++ b/src/libcore/str/mod.rs
|
|
|
|
@@ -26,9 +26,9 @@ use mem;
|
|
|
|
|
|
|
|
pub mod pattern;
|
|
|
|
|
|
|
|
-#[unstable(feature = "str_internals", issue = "0")]
|
|
|
|
-#[allow(missing_docs)]
|
|
|
|
-pub mod lossy;
|
|
|
|
+//#[unstable(feature = "str_internals", issue = "0")]
|
|
|
|
+//#[allow(missing_docs)]
|
|
|
|
+//pub mod lossy;
|
|
|
|
|
|
|
|
/// A trait to abstract the idea of creating a new instance of a type from a
|
|
|
|
/// string.
|
|
|
|
--
|
|
|
|
2.11.0
|
|
|
|
|