Auto merge of #38049 - frewsxcv:libunicode, r=alexcrichton

Rename 'librustc_unicode' crate to 'libstd_unicode'.

Fixes https://github.com/rust-lang/rust/issues/26554.
This commit is contained in:
bors 2016-12-12 13:19:33 +00:00
commit b4b1e5ece2
26 changed files with 44 additions and 44 deletions

View File

@ -52,7 +52,7 @@
TARGET_CRATES := libc std term \
getopts collections test rand \
compiler_builtins core alloc \
rustc_unicode rustc_bitflags \
std_unicode rustc_bitflags \
alloc_system alloc_jemalloc \
panic_abort panic_unwind unwind
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
@ -69,11 +69,11 @@ DEPS_compiler_builtins := core native:compiler-rt
DEPS_alloc := core libc alloc_system
DEPS_alloc_system := core libc
DEPS_alloc_jemalloc := core libc native:jemalloc
DEPS_collections := core alloc rustc_unicode
DEPS_collections := core alloc std_unicode
DEPS_libc := core
DEPS_rand := core
DEPS_rustc_bitflags := core
DEPS_rustc_unicode := core
DEPS_std_unicode := core
DEPS_panic_abort := libc alloc
DEPS_panic_unwind := libc alloc unwind
DEPS_unwind := libc
@ -81,7 +81,7 @@ DEPS_unwind := libc
RUSTFLAGS_compiler_builtins := -lstatic=compiler-rt
RUSTFLAGS_panic_abort := -C panic=abort
DEPS_std := core libc rand alloc collections compiler_builtins rustc_unicode \
DEPS_std := core libc rand alloc collections compiler_builtins std_unicode \
native:backtrace \
alloc_system panic_abort panic_unwind unwind
DEPS_arena := std
@ -96,7 +96,7 @@ DEPS_serialize := std log
DEPS_term := std
DEPS_test := std getopts term native:rust_test_helpers
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode rustc_errors syntax_pos rustc_data_structures
DEPS_syntax := std term serialize log arena libc rustc_bitflags std_unicode rustc_errors syntax_pos rustc_data_structures
DEPS_syntax_ext := syntax syntax_pos rustc_errors fmt_macros proc_macro
DEPS_syntax_pos := serialize
DEPS_proc_macro_tokens := syntax syntax_pos log
@ -158,7 +158,7 @@ ONLY_RLIB_libc := 1
ONLY_RLIB_alloc := 1
ONLY_RLIB_rand := 1
ONLY_RLIB_collections := 1
ONLY_RLIB_rustc_unicode := 1
ONLY_RLIB_std_unicode := 1
ONLY_RLIB_rustc_bitflags := 1
ONLY_RLIB_alloc_system := 1
ONLY_RLIB_alloc_jemalloc := 1
@ -169,7 +169,7 @@ ONLY_RLIB_unwind := 1
TARGET_SPECIFIC_alloc_jemalloc := 1
# Documented-by-default crates
DOC_CRATES := std alloc collections core libc rustc_unicode
DOC_CRATES := std alloc collections core libc std_unicode
ifeq ($(CFG_DISABLE_JEMALLOC),)
RUSTFLAGS_rustc_back := --cfg 'feature="jemalloc"'

View File

@ -15,7 +15,7 @@
# The names of crates that must be tested
# libcore/librustc_unicode tests are in a separate crate
# libcore/libstd_unicode tests are in a separate crate
DEPS_coretest :=
$(eval $(call RUST_CRATE,coretest))

18
src/Cargo.lock generated
View File

@ -72,7 +72,7 @@ version = "0.0.0"
dependencies = [
"alloc 0.0.0",
"core 0.0.0",
"rustc_unicode 0.0.0",
"std_unicode 0.0.0",
]
[[package]]
@ -545,13 +545,6 @@ dependencies = [
"syntax_pos 0.0.0",
]
[[package]]
name = "rustc_unicode"
version = "0.0.0"
dependencies = [
"core 0.0.0",
]
[[package]]
name = "rustdoc"
version = "0.0.0"
@ -599,7 +592,7 @@ dependencies = [
"panic_abort 0.0.0",
"panic_unwind 0.0.0",
"rand 0.0.0",
"rustc_unicode 0.0.0",
"std_unicode 0.0.0",
"unwind 0.0.0",
]
@ -611,6 +604,13 @@ dependencies = [
"std 0.0.0",
]
[[package]]
name = "std_unicode"
version = "0.0.0"
dependencies = [
"core 0.0.0",
]
[[package]]
name = "syntax"
version = "0.0.0"

View File

@ -10,7 +10,7 @@ path = "lib.rs"
[dependencies]
alloc = { path = "../liballoc" }
core = { path = "../libcore" }
rustc_unicode = { path = "../librustc_unicode" }
std_unicode = { path = "../libstd_unicode" }
[[test]]
name = "collectionstest"

View File

@ -59,7 +59,7 @@
#![no_std]
extern crate rustc_unicode;
extern crate std_unicode;
extern crate alloc;
#[cfg(test)]

View File

@ -24,12 +24,12 @@ use core::str::pattern::Pattern;
use core::str::pattern::{Searcher, ReverseSearcher, DoubleEndedSearcher};
use core::mem;
use core::iter::FusedIterator;
use rustc_unicode::str::{UnicodeStr, Utf16Encoder};
use std_unicode::str::{UnicodeStr, Utf16Encoder};
use vec_deque::VecDeque;
use borrow::{Borrow, ToOwned};
use string::String;
use rustc_unicode;
use std_unicode;
use vec::Vec;
use slice::SliceConcatExt;
use boxed::Box;
@ -54,7 +54,7 @@ pub use core::str::{from_utf8, Chars, CharIndices, Bytes};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{from_utf8_unchecked, ParseBoolError};
#[stable(feature = "rust1", since = "1.0.0")]
pub use rustc_unicode::str::SplitWhitespace;
pub use std_unicode::str::SplitWhitespace;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::pattern;
@ -1705,7 +1705,7 @@ impl str {
}
fn case_ignoreable_then_cased<I: Iterator<Item = char>>(iter: I) -> bool {
use rustc_unicode::derived_property::{Cased, Case_Ignorable};
use std_unicode::derived_property::{Cased, Case_Ignorable};
match iter.skip_while(|&c| Case_Ignorable(c)).next() {
Some(c) => Cased(c),
None => false,

View File

@ -63,8 +63,8 @@ use core::mem;
use core::ops::{self, Add, AddAssign, Index, IndexMut};
use core::ptr;
use core::str::pattern::Pattern;
use rustc_unicode::char::{decode_utf16, REPLACEMENT_CHARACTER};
use rustc_unicode::str as unicode_str;
use std_unicode::char::{decode_utf16, REPLACEMENT_CHARACTER};
use std_unicode::str as unicode_str;
use borrow::{Cow, ToOwned};
use range::RangeArgument;

View File

@ -33,7 +33,7 @@
extern crate collections;
extern crate test;
extern crate rustc_unicode;
extern crate std_unicode;
use std::hash::{Hash, Hasher};
use std::collections::hash_map::DefaultHasher;

View File

@ -530,7 +530,7 @@ fn from_utf8_mostly_ascii() {
#[test]
fn test_is_utf16() {
use rustc_unicode::str::is_utf16;
use std_unicode::str::is_utf16;
macro_rules! pos {
($($e:expr),*) => { { $(assert!(is_utf16($e));)* } }
@ -1186,7 +1186,7 @@ fn test_rev_split_char_iterator_no_trailing() {
#[test]
fn test_utf16_code_units() {
use rustc_unicode::str::Utf16Encoder;
use std_unicode::str::Utf16Encoder;
assert_eq!(Utf16Encoder::new(vec!['é', '\u{1F4A9}'].into_iter()).collect::<Vec<u16>>(),
[0xE9, 0xD83D, 0xDCA9])
}

View File

@ -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!(::rustc_unicode::str::is_utf16(&u));
assert!(::std_unicode::str::is_utf16(&u));
assert_eq!(s_as_utf16, u);
assert_eq!(u_as_string, s);

View File

@ -10,7 +10,7 @@
//! Character manipulation.
//!
//! For more details, see ::rustc_unicode::char (a.k.a. std::char)
//! For more details, see ::std_unicode::char (a.k.a. std::char)
#![allow(non_snake_case)]
#![stable(feature = "core_char", since = "1.2.0")]

View File

@ -40,7 +40,7 @@
extern crate core;
extern crate test;
extern crate libc;
extern crate rustc_unicode;
extern crate std_unicode;
extern crate rand;
mod any;

View File

@ -31,7 +31,7 @@ extern crate term;
extern crate log;
#[macro_use]
extern crate libc;
extern crate rustc_unicode;
extern crate std_unicode;
extern crate serialize as rustc_serialize; // used by deriving
extern crate syntax_pos;

View File

@ -45,7 +45,7 @@ extern crate serialize;
#[macro_use] extern crate syntax;
extern crate syntax_pos;
extern crate test as testing;
extern crate rustc_unicode;
extern crate std_unicode;
#[macro_use] extern crate log;
extern crate rustc_errors as errors;

View File

@ -345,7 +345,7 @@ pub fn maketest(s: &str, cratename: Option<&str>, dont_insert_main: bool,
}
fn partition_source(s: &str) -> (String, String) {
use rustc_unicode::str::UnicodeStr;
use std_unicode::str::UnicodeStr;
let mut after_header = false;
let mut before = String::new();

View File

@ -41,7 +41,7 @@ Core encoding and decoding interfaces.
#[cfg(test)] extern crate test;
#[macro_use] extern crate log;
extern crate rustc_unicode;
extern crate std_unicode;
extern crate collections;
pub use self::serialize::{Decoder, Encoder, Decodable, Encodable};

View File

@ -20,7 +20,7 @@ core = { path = "../libcore" }
libc = { path = "../rustc/libc_shim" }
rand = { path = "../librand" }
compiler_builtins = { path = "../libcompiler_builtins" }
rustc_unicode = { path = "../librustc_unicode" }
std_unicode = { path = "../libstd_unicode" }
unwind = { path = "../libunwind" }
[build-dependencies]

View File

@ -256,7 +256,7 @@
#![stable(feature = "rust1", since = "1.0.0")]
use cmp;
use rustc_unicode::str as core_str;
use std_unicode::str as core_str;
use error as std_error;
use fmt;
use result;

View File

@ -323,7 +323,7 @@ extern crate collections as core_collections;
#[allow(deprecated)] extern crate rand as core_rand;
extern crate alloc;
extern crate rustc_unicode;
extern crate std_unicode;
extern crate libc;
// We always need an unwinder currently for backtraces
@ -420,7 +420,7 @@ pub use core_collections::string;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::vec;
#[stable(feature = "rust1", since = "1.0.0")]
pub use rustc_unicode::char;
pub use std_unicode::char;
pub mod f32;
pub mod f64;

View File

@ -1,10 +1,10 @@
[package]
authors = ["The Rust Project Developers"]
name = "rustc_unicode"
name = "std_unicode"
version = "0.0.0"
[lib]
name = "rustc_unicode"
name = "std_unicode"
path = "lib.rs"
test = false
bench = false

View File

@ -20,7 +20,7 @@
//! provide for basic string-related manipulations. This crate does not
//! (yet) aim to provide a full set of Unicode tables.
#![crate_name = "rustc_unicode"]
#![crate_name = "std_unicode"]
#![unstable(feature = "unicode", issue = "27783")]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -41,7 +41,7 @@ extern crate term;
extern crate libc;
#[macro_use] extern crate log;
#[macro_use] #[no_link] extern crate rustc_bitflags;
extern crate rustc_unicode;
extern crate std_unicode;
pub extern crate rustc_errors as errors;
extern crate syntax_pos;
extern crate rustc_data_structures;

View File

@ -16,7 +16,7 @@ use ext::tt::transcribe::tt_next_token;
use parse::token;
use str::char_at;
use symbol::{Symbol, keywords};
use rustc_unicode::property::Pattern_White_Space;
use std_unicode::property::Pattern_White_Space;
use std::borrow::Cow;
use std::char;