diff --git a/mk/crates.mk b/mk/crates.mk index acb36b2f7da..79df941aeb3 100644 --- a/mk/crates.mk +++ b/mk/crates.mk @@ -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"' diff --git a/mk/tests.mk b/mk/tests.mk index 35ee7697a7a..345fc1679b0 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -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)) diff --git a/src/Cargo.lock b/src/Cargo.lock index b3388563adc..4c6aeeddd38 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -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" diff --git a/src/libcollections/Cargo.toml b/src/libcollections/Cargo.toml index 3056977d224..ab882fde9c2 100644 --- a/src/libcollections/Cargo.toml +++ b/src/libcollections/Cargo.toml @@ -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" diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index 191a6b0b7a9..68b067012d3 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -59,7 +59,7 @@ #![no_std] -extern crate rustc_unicode; +extern crate std_unicode; extern crate alloc; #[cfg(test)] diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 48a74bdecbb..d4be0914f15 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -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>(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, diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index fff7c160e31..b4c41a99a6b 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -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; diff --git a/src/libcollectionstest/lib.rs b/src/libcollectionstest/lib.rs index 58ce78eab9a..0fe0a1bad64 100644 --- a/src/libcollectionstest/lib.rs +++ b/src/libcollectionstest/lib.rs @@ -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; diff --git a/src/libcollectionstest/str.rs b/src/libcollectionstest/str.rs index 14a0819d381..384579ce6b8 100644 --- a/src/libcollectionstest/str.rs +++ b/src/libcollectionstest/str.rs @@ -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::>(), [0xE9, 0xD83D, 0xDCA9]) } diff --git a/src/libcollectionstest/string.rs b/src/libcollectionstest/string.rs index cb4fcb58452..a7d85d0bea1 100644 --- a/src/libcollectionstest/string.rs +++ b/src/libcollectionstest/string.rs @@ -132,7 +132,7 @@ fn test_from_utf16() { let s_as_utf16 = s.encode_utf16().collect::>(); 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); diff --git a/src/libcore/char.rs b/src/libcore/char.rs index 966481e7b32..7f3ac13bac1 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -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")] diff --git a/src/libcoretest/lib.rs b/src/libcoretest/lib.rs index b8c01e570f5..92fb01e535c 100644 --- a/src/libcoretest/lib.rs +++ b/src/libcoretest/lib.rs @@ -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; diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index d7c15f550e0..09a0c7f9be4 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -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; diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index afa5d66b113..74c7bc10194 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -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; diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index 794b7b91bd2..b96a737ed00 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -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(); diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index d432ed42066..ad2304e1556 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -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}; diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml index b9f52e20fdd..fcf84cb7169 100644 --- a/src/libstd/Cargo.toml +++ b/src/libstd/Cargo.toml @@ -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] diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index ad9ae5638b6..b3b89213df1 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -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; diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 1f40d3fd1d3..414f25fa5eb 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -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; diff --git a/src/librustc_unicode/Cargo.toml b/src/libstd_unicode/Cargo.toml similarity index 78% rename from src/librustc_unicode/Cargo.toml rename to src/libstd_unicode/Cargo.toml index e2b4afb2a51..28fbd3c1aa9 100644 --- a/src/librustc_unicode/Cargo.toml +++ b/src/libstd_unicode/Cargo.toml @@ -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 diff --git a/src/librustc_unicode/char.rs b/src/libstd_unicode/char.rs similarity index 100% rename from src/librustc_unicode/char.rs rename to src/libstd_unicode/char.rs diff --git a/src/librustc_unicode/lib.rs b/src/libstd_unicode/lib.rs similarity index 98% rename from src/librustc_unicode/lib.rs rename to src/libstd_unicode/lib.rs index 65bd717e01a..b086658ee0d 100644 --- a/src/librustc_unicode/lib.rs +++ b/src/libstd_unicode/lib.rs @@ -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", diff --git a/src/librustc_unicode/tables.rs b/src/libstd_unicode/tables.rs similarity index 100% rename from src/librustc_unicode/tables.rs rename to src/libstd_unicode/tables.rs diff --git a/src/librustc_unicode/u_str.rs b/src/libstd_unicode/u_str.rs similarity index 100% rename from src/librustc_unicode/u_str.rs rename to src/libstd_unicode/u_str.rs diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 3e8dfda4a9a..b3b0ee6093d 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -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; diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 681dec0ab56..818742e4492 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -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;