Skip to content

Commit

Permalink
Auto merge of #38049 - frewsxcv:libunicode, r=alexcrichton
Browse files Browse the repository at this point in the history
Rename 'librustc_unicode' crate to 'libstd_unicode'.

Fixes #26554.
  • Loading branch information
bors committed Dec 12, 2016
2 parents 0eae43e + 274777a commit b4b1e5e
Show file tree
Hide file tree
Showing 26 changed files with 44 additions and 44 deletions.
14 changes: 7 additions & 7 deletions mk/crates.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -69,19 +69,19 @@ 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

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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"'
Expand Down
2 changes: 1 addition & 1 deletion mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
18 changes: 9 additions & 9 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/libcollections/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

#![no_std]

extern crate rustc_unicode;
extern crate std_unicode;
extern crate alloc;

#[cfg(test)]
Expand Down
8 changes: 4 additions & 4 deletions src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/libcollectionstest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/libcollectionstest/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));)* } }
Expand Down Expand Up @@ -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])
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcollectionstest/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion src/libcoretest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_errors/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/libserialize/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/librustc_unicode/lib.rs → src/libstd_unicode/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/libsyntax/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/parse/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b4b1e5e

Please sign in to comment.