Skip to content

Commit b2027ef

Browse files
committed
Deprecate the std_unicode crate
1 parent 5807be7 commit b2027ef

File tree

16 files changed

+13
-20
lines changed

16 files changed

+13
-20
lines changed

src/Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ci/docker/wasm32-unknown/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@ ENV SCRIPT python2.7 /checkout/x.py test --target $TARGETS \
3434
src/test/mir-opt \
3535
src/test/codegen-units \
3636
src/libcore \
37-
src/libstd_unicode/ \

src/doc/unstable-book/src/language-features/lang-items.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ the source code.
243243
- `usize`: `libcore/num/mod.rs`
244244
- `f32`: `libstd/f32.rs`
245245
- `f64`: `libstd/f64.rs`
246-
- `char`: `libstd_unicode/char.rs`
246+
- `char`: `libcore/char.rs`
247247
- `slice`: `liballoc/slice.rs`
248248
- `str`: `liballoc/str.rs`
249249
- `const_ptr`: `libcore/ptr.rs`

src/liballoc/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ path = "lib.rs"
99

1010
[dependencies]
1111
core = { path = "../libcore" }
12-
std_unicode = { path = "../libstd_unicode" }
1312
compiler_builtins = { path = "../rustc/compiler_builtins_shim" }
1413

1514
[dev-dependencies]

src/liballoc/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ extern crate test;
135135
#[cfg(test)]
136136
extern crate rand;
137137

138-
extern crate std_unicode;
139-
140138
// Module with internal macros used by other modules (needs to be included before other modules).
141139
#[macro_use]
142140
mod macros;

src/liballoc/str.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@ use core::str::pattern::{Searcher, ReverseSearcher, DoubleEndedSearcher};
4545
use core::mem;
4646
use core::ptr;
4747
use core::iter::FusedIterator;
48-
use std_unicode::str::{UnicodeStr, Utf16Encoder};
48+
use core::unicode::str::{UnicodeStr, Utf16Encoder};
4949

5050
use vec_deque::VecDeque;
5151
use borrow::{Borrow, ToOwned};
5252
use string::String;
53-
use std_unicode;
5453
use vec::Vec;
5554
use slice::{SliceConcatExt, SliceIndex};
5655
use boxed::Box;
@@ -75,7 +74,7 @@ pub use core::str::{from_utf8, from_utf8_mut, Chars, CharIndices, Bytes};
7574
#[stable(feature = "rust1", since = "1.0.0")]
7675
pub use core::str::{from_utf8_unchecked, from_utf8_unchecked_mut, ParseBoolError};
7776
#[stable(feature = "rust1", since = "1.0.0")]
78-
pub use std_unicode::str::SplitWhitespace;
77+
pub use core::unicode::str::SplitWhitespace;
7978
#[stable(feature = "rust1", since = "1.0.0")]
8079
pub use core::str::pattern;
8180

@@ -1960,7 +1959,7 @@ impl str {
19601959
}
19611960

19621961
fn case_ignoreable_then_cased<I: Iterator<Item = char>>(iter: I) -> bool {
1963-
use std_unicode::derived_property::{Cased, Case_Ignorable};
1962+
use core::unicode::derived_property::{Cased, Case_Ignorable};
19641963
match iter.skip_while(|&c| Case_Ignorable(c)).next() {
19651964
Some(c) => Cased(c),
19661965
None => false,

src/liballoc/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ use core::ops::{self, Add, AddAssign, Index, IndexMut, RangeBounds};
6464
use core::ptr;
6565
use core::str::pattern::Pattern;
6666
use core::str::lossy;
67-
use std_unicode::char::{decode_utf16, REPLACEMENT_CHARACTER};
67+
use core::unicode::char::{decode_utf16, REPLACEMENT_CHARACTER};
6868

6969
use borrow::{Cow, ToOwned};
7070
use str::{self, from_boxed_utf8_unchecked, FromStr, Utf8Error, Chars};

src/liballoc/tests/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#![feature(inclusive_range_fields)]
3030

3131
extern crate alloc_system;
32-
extern crate std_unicode;
32+
extern crate core;
3333
extern crate rand;
3434

3535
use std::hash::{Hash, Hasher};

src/liballoc/tests/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ fn test_rev_split_char_iterator_no_trailing() {
12041204

12051205
#[test]
12061206
fn test_utf16_code_units() {
1207-
use std_unicode::str::Utf16Encoder;
1207+
use core::unicode::str::Utf16Encoder;
12081208
assert_eq!(Utf16Encoder::new(vec!['é', '\u{1F4A9}'].into_iter()).collect::<Vec<u16>>(),
12091209
[0xE9, 0xD83D, 0xDCA9])
12101210
}

src/liballoc/tests/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn test_from_utf16() {
132132
let s_as_utf16 = s.encode_utf16().collect::<Vec<u16>>();
133133
let u_as_string = String::from_utf16(&u).unwrap();
134134

135-
assert!(::std_unicode::char::decode_utf16(u.iter().cloned()).all(|r| r.is_ok()));
135+
assert!(::core::unicode::char::decode_utf16(u.iter().cloned()).all(|r| r.is_ok()));
136136
assert_eq!(s_as_utf16, u);
137137

138138
assert_eq!(u_as_string, s);

0 commit comments

Comments
 (0)