Deprecate the std_unicode crate
This commit is contained in:
parent
5807be7ccb
commit
b2027ef17c
1
src/Cargo.lock
generated
1
src/Cargo.lock
generated
@ -13,7 +13,6 @@ dependencies = [
|
||||
"compiler_builtins 0.0.0",
|
||||
"core 0.0.0",
|
||||
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"std_unicode 0.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -34,4 +34,3 @@ ENV SCRIPT python2.7 /checkout/x.py test --target $TARGETS \
|
||||
src/test/mir-opt \
|
||||
src/test/codegen-units \
|
||||
src/libcore \
|
||||
src/libstd_unicode/ \
|
||||
|
@ -243,7 +243,7 @@ the source code.
|
||||
- `usize`: `libcore/num/mod.rs`
|
||||
- `f32`: `libstd/f32.rs`
|
||||
- `f64`: `libstd/f64.rs`
|
||||
- `char`: `libstd_unicode/char.rs`
|
||||
- `char`: `libcore/char.rs`
|
||||
- `slice`: `liballoc/slice.rs`
|
||||
- `str`: `liballoc/str.rs`
|
||||
- `const_ptr`: `libcore/ptr.rs`
|
||||
|
@ -9,7 +9,6 @@ path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
core = { path = "../libcore" }
|
||||
std_unicode = { path = "../libstd_unicode" }
|
||||
compiler_builtins = { path = "../rustc/compiler_builtins_shim" }
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -135,8 +135,6 @@
|
||||
#[cfg(test)]
|
||||
extern crate rand;
|
||||
|
||||
extern crate std_unicode;
|
||||
|
||||
// Module with internal macros used by other modules (needs to be included before other modules).
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
|
@ -45,12 +45,11 @@
|
||||
use core::mem;
|
||||
use core::ptr;
|
||||
use core::iter::FusedIterator;
|
||||
use std_unicode::str::{UnicodeStr, Utf16Encoder};
|
||||
use core::unicode::str::{UnicodeStr, Utf16Encoder};
|
||||
|
||||
use vec_deque::VecDeque;
|
||||
use borrow::{Borrow, ToOwned};
|
||||
use string::String;
|
||||
use std_unicode;
|
||||
use vec::Vec;
|
||||
use slice::{SliceConcatExt, SliceIndex};
|
||||
use boxed::Box;
|
||||
@ -75,7 +74,7 @@
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::str::{from_utf8_unchecked, from_utf8_unchecked_mut, ParseBoolError};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use std_unicode::str::SplitWhitespace;
|
||||
pub use core::unicode::str::SplitWhitespace;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::str::pattern;
|
||||
|
||||
@ -1960,7 +1959,7 @@ fn map_uppercase_sigma(from: &str, i: usize, to: &mut String) {
|
||||
}
|
||||
|
||||
fn case_ignoreable_then_cased<I: Iterator<Item = char>>(iter: I) -> bool {
|
||||
use std_unicode::derived_property::{Cased, Case_Ignorable};
|
||||
use core::unicode::derived_property::{Cased, Case_Ignorable};
|
||||
match iter.skip_while(|&c| Case_Ignorable(c)).next() {
|
||||
Some(c) => Cased(c),
|
||||
None => false,
|
||||
|
@ -64,7 +64,7 @@
|
||||
use core::ptr;
|
||||
use core::str::pattern::Pattern;
|
||||
use core::str::lossy;
|
||||
use std_unicode::char::{decode_utf16, REPLACEMENT_CHARACTER};
|
||||
use core::unicode::char::{decode_utf16, REPLACEMENT_CHARACTER};
|
||||
|
||||
use borrow::{Cow, ToOwned};
|
||||
use str::{self, from_boxed_utf8_unchecked, FromStr, Utf8Error, Chars};
|
||||
|
@ -29,7 +29,7 @@
|
||||
#![feature(inclusive_range_fields)]
|
||||
|
||||
extern crate alloc_system;
|
||||
extern crate std_unicode;
|
||||
extern crate core;
|
||||
extern crate rand;
|
||||
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
@ -1204,7 +1204,7 @@ fn test_rev_split_char_iterator_no_trailing() {
|
||||
|
||||
#[test]
|
||||
fn test_utf16_code_units() {
|
||||
use std_unicode::str::Utf16Encoder;
|
||||
use core::unicode::str::Utf16Encoder;
|
||||
assert_eq!(Utf16Encoder::new(vec!['é', '\u{1F4A9}'].into_iter()).collect::<Vec<u16>>(),
|
||||
[0xE9, 0xD83D, 0xDCA9])
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ fn test_from_utf16() {
|
||||
let s_as_utf16 = s.encode_utf16().collect::<Vec<u16>>();
|
||||
let u_as_string = String::from_utf16(&u).unwrap();
|
||||
|
||||
assert!(::std_unicode::char::decode_utf16(u.iter().cloned()).all(|r| r.is_ok()));
|
||||
assert!(::core::unicode::char::decode_utf16(u.iter().cloned()).all(|r| r.is_ok()));
|
||||
assert_eq!(s_as_utf16, u);
|
||||
|
||||
assert_eq!(u_as_string, s);
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
//! Character manipulation.
|
||||
//!
|
||||
//! For more details, see ::std_unicode::char (a.k.a. std::char)
|
||||
//! For more details, see ::core::unicode::char (a.k.a. std::char)
|
||||
|
||||
#![allow(non_snake_case)]
|
||||
#![stable(feature = "core_char", since = "1.2.0")]
|
||||
|
@ -41,7 +41,6 @@
|
||||
#[macro_use] extern crate syntax;
|
||||
extern crate syntax_pos;
|
||||
extern crate test as testing;
|
||||
extern crate std_unicode;
|
||||
#[macro_use] extern crate log;
|
||||
extern crate rustc_errors as errors;
|
||||
extern crate pulldown_cmark;
|
||||
|
@ -354,7 +354,6 @@
|
||||
#[macro_reexport(vec, format)]
|
||||
extern crate alloc;
|
||||
extern crate alloc_system;
|
||||
extern crate std_unicode;
|
||||
#[doc(masked)]
|
||||
extern crate libc;
|
||||
|
||||
@ -455,7 +454,7 @@
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use alloc::vec;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use std_unicode::char;
|
||||
pub use core::unicode::char;
|
||||
#[stable(feature = "i128", since = "1.26.0")]
|
||||
pub use core::u128;
|
||||
|
||||
|
@ -31,5 +31,6 @@
|
||||
|
||||
#![feature(unicode)]
|
||||
#![feature(staged_api)]
|
||||
#![rustc_deprecated(since = "1.27.0", reason = "moved into libcore")]
|
||||
|
||||
pub use core::unicode::*;
|
||||
|
@ -32,9 +32,9 @@
|
||||
extern crate rustc_cratesio_shim;
|
||||
|
||||
#[macro_use] extern crate bitflags;
|
||||
extern crate core;
|
||||
extern crate serialize;
|
||||
#[macro_use] extern crate log;
|
||||
extern crate std_unicode;
|
||||
pub extern crate rustc_errors as errors;
|
||||
extern crate syntax_pos;
|
||||
extern crate rustc_data_structures;
|
||||
|
@ -15,7 +15,7 @@
|
||||
use parse::{token, ParseSess};
|
||||
use str::char_at;
|
||||
use symbol::{Symbol, keywords};
|
||||
use std_unicode::property::Pattern_White_Space;
|
||||
use core::unicode::property::Pattern_White_Space;
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::char;
|
||||
|
Loading…
Reference in New Issue
Block a user