93 lines
2.8 KiB
Diff
93 lines
2.8 KiB
Diff
From a65665bae4e5ad6ef76a365b7cdff8bdfbd3db67 Mon Sep 17 00:00:00 2001
|
||
From: bjorn3 <bjorn3@users.noreply.github.com>
|
||
Date: Sat, 6 Oct 2018 11:03:00 +0200
|
||
Subject: [PATCH] [alloc] Disable some unsupported stuff
|
||
|
||
---
|
||
src/liballoc/boxed.rs | 6 ------
|
||
src/liballoc/str.rs | 4 ++++
|
||
src/liballoc/vec.rs | 2 --
|
||
3 files changed, 4 insertions(+), 8 deletions(-)
|
||
|
||
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
|
||
index f989e70..597dd15 100644
|
||
--- a/src/liballoc/boxed.rs
|
||
+++ b/src/liballoc/boxed.rs
|
||
@@ -410,9 +410,6 @@ impl<T: ?Sized + Hasher> Hasher for Box<T> {
|
||
fn write_u64(&mut self, i: u64) {
|
||
(**self).write_u64(i)
|
||
}
|
||
- fn write_u128(&mut self, i: u128) {
|
||
- (**self).write_u128(i)
|
||
- }
|
||
fn write_usize(&mut self, i: usize) {
|
||
(**self).write_usize(i)
|
||
}
|
||
@@ -428,9 +425,6 @@ impl<T: ?Sized + Hasher> Hasher for Box<T> {
|
||
fn write_i64(&mut self, i: i64) {
|
||
(**self).write_i64(i)
|
||
}
|
||
- fn write_i128(&mut self, i: i128) {
|
||
- (**self).write_i128(i)
|
||
- }
|
||
fn write_isize(&mut self, i: isize) {
|
||
(**self).write_isize(i)
|
||
}
|
||
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
|
||
index 2af8956..23dbb79 100644
|
||
--- a/src/liballoc/str.rs
|
||
+++ b/src/liballoc/str.rs
|
||
@@ -361,6 +361,7 @@ impl str {
|
||
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
|
||
pub fn to_lowercase(&self) -> String {
|
||
let mut s = String::with_capacity(self.len());
|
||
+ /*
|
||
for (i, c) in self[..].char_indices() {
|
||
if c == 'Σ' {
|
||
// Σ maps to σ, except at the end of a word where it maps to ς.
|
||
@@ -384,6 +385,7 @@ impl str {
|
||
}
|
||
}
|
||
}
|
||
+ */
|
||
return s;
|
||
|
||
fn map_uppercase_sigma(from: &str, i: usize, to: &mut String) {
|
||
@@ -435,6 +437,7 @@ impl str {
|
||
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
|
||
pub fn to_uppercase(&self) -> String {
|
||
let mut s = String::with_capacity(self.len());
|
||
+ /*
|
||
for c in self[..].chars() {
|
||
match conversions::to_upper(c) {
|
||
[a, '\0', _] => s.push(a),
|
||
@@ -449,6 +452,7 @@ impl str {
|
||
}
|
||
}
|
||
}
|
||
+ */
|
||
return s;
|
||
}
|
||
|
||
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
|
||
index 2bc037e..2fe8894 100644
|
||
--- a/src/liballoc/vec.rs
|
||
+++ b/src/liballoc/vec.rs
|
||
@@ -1569,13 +1569,11 @@ impl_is_zero!(i8, |x| x == 0);
|
||
impl_is_zero!(i16, |x| x == 0);
|
||
impl_is_zero!(i32, |x| x == 0);
|
||
impl_is_zero!(i64, |x| x == 0);
|
||
-impl_is_zero!(i128, |x| x == 0);
|
||
impl_is_zero!(isize, |x| x == 0);
|
||
|
||
impl_is_zero!(u16, |x| x == 0);
|
||
impl_is_zero!(u32, |x| x == 0);
|
||
impl_is_zero!(u64, |x| x == 0);
|
||
-impl_is_zero!(u128, |x| x == 0);
|
||
impl_is_zero!(usize, |x| x == 0);
|
||
|
||
impl_is_zero!(char, |x| x == '\0');
|
||
--
|
||
2.17.1 (Apple Git-112)
|
||
|