Skip to content

Commit b4b1e5e

Browse files
committed
Auto merge of rust-lang#38049 - frewsxcv:libunicode, r=alexcrichton
Rename 'librustc_unicode' crate to 'libstd_unicode'. Fixes rust-lang#26554.
2 parents 0eae43e + 274777a commit b4b1e5e

File tree

26 files changed

+44
-44
lines changed

26 files changed

+44
-44
lines changed

mk/crates.mk

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
TARGET_CRATES := libc std term \
5353
getopts collections test rand \
5454
compiler_builtins core alloc \
55-
rustc_unicode rustc_bitflags \
55+
std_unicode rustc_bitflags \
5656
alloc_system alloc_jemalloc \
5757
panic_abort panic_unwind unwind
5858
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
@@ -69,19 +69,19 @@ DEPS_compiler_builtins := core native:compiler-rt
6969
DEPS_alloc := core libc alloc_system
7070
DEPS_alloc_system := core libc
7171
DEPS_alloc_jemalloc := core libc native:jemalloc
72-
DEPS_collections := core alloc rustc_unicode
72+
DEPS_collections := core alloc std_unicode
7373
DEPS_libc := core
7474
DEPS_rand := core
7575
DEPS_rustc_bitflags := core
76-
DEPS_rustc_unicode := core
76+
DEPS_std_unicode := core
7777
DEPS_panic_abort := libc alloc
7878
DEPS_panic_unwind := libc alloc unwind
7979
DEPS_unwind := libc
8080

8181
RUSTFLAGS_compiler_builtins := -lstatic=compiler-rt
8282
RUSTFLAGS_panic_abort := -C panic=abort
8383

84-
DEPS_std := core libc rand alloc collections compiler_builtins rustc_unicode \
84+
DEPS_std := core libc rand alloc collections compiler_builtins std_unicode \
8585
native:backtrace \
8686
alloc_system panic_abort panic_unwind unwind
8787
DEPS_arena := std
@@ -96,7 +96,7 @@ DEPS_serialize := std log
9696
DEPS_term := std
9797
DEPS_test := std getopts term native:rust_test_helpers
9898

99-
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode rustc_errors syntax_pos rustc_data_structures
99+
DEPS_syntax := std term serialize log arena libc rustc_bitflags std_unicode rustc_errors syntax_pos rustc_data_structures
100100
DEPS_syntax_ext := syntax syntax_pos rustc_errors fmt_macros proc_macro
101101
DEPS_syntax_pos := serialize
102102
DEPS_proc_macro_tokens := syntax syntax_pos log
@@ -158,7 +158,7 @@ ONLY_RLIB_libc := 1
158158
ONLY_RLIB_alloc := 1
159159
ONLY_RLIB_rand := 1
160160
ONLY_RLIB_collections := 1
161-
ONLY_RLIB_rustc_unicode := 1
161+
ONLY_RLIB_std_unicode := 1
162162
ONLY_RLIB_rustc_bitflags := 1
163163
ONLY_RLIB_alloc_system := 1
164164
ONLY_RLIB_alloc_jemalloc := 1
@@ -169,7 +169,7 @@ ONLY_RLIB_unwind := 1
169169
TARGET_SPECIFIC_alloc_jemalloc := 1
170170

171171
# Documented-by-default crates
172-
DOC_CRATES := std alloc collections core libc rustc_unicode
172+
DOC_CRATES := std alloc collections core libc std_unicode
173173

174174
ifeq ($(CFG_DISABLE_JEMALLOC),)
175175
RUSTFLAGS_rustc_back := --cfg 'feature="jemalloc"'

mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# The names of crates that must be tested
1717

18-
# libcore/librustc_unicode tests are in a separate crate
18+
# libcore/libstd_unicode tests are in a separate crate
1919
DEPS_coretest :=
2020
$(eval $(call RUST_CRATE,coretest))
2121

src/Cargo.lock

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

src/libcollections/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010
[dependencies]
1111
alloc = { path = "../liballoc" }
1212
core = { path = "../libcore" }
13-
rustc_unicode = { path = "../librustc_unicode" }
13+
std_unicode = { path = "../libstd_unicode" }
1414

1515
[[test]]
1616
name = "collectionstest"

src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
#![no_std]
6161

62-
extern crate rustc_unicode;
62+
extern crate std_unicode;
6363
extern crate alloc;
6464

6565
#[cfg(test)]

src/libcollections/str.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ use core::str::pattern::Pattern;
2424
use core::str::pattern::{Searcher, ReverseSearcher, DoubleEndedSearcher};
2525
use core::mem;
2626
use core::iter::FusedIterator;
27-
use rustc_unicode::str::{UnicodeStr, Utf16Encoder};
27+
use std_unicode::str::{UnicodeStr, Utf16Encoder};
2828

2929
use vec_deque::VecDeque;
3030
use borrow::{Borrow, ToOwned};
3131
use string::String;
32-
use rustc_unicode;
32+
use std_unicode;
3333
use vec::Vec;
3434
use slice::SliceConcatExt;
3535
use boxed::Box;
@@ -54,7 +54,7 @@ pub use core::str::{from_utf8, Chars, CharIndices, Bytes};
5454
#[stable(feature = "rust1", since = "1.0.0")]
5555
pub use core::str::{from_utf8_unchecked, ParseBoolError};
5656
#[stable(feature = "rust1", since = "1.0.0")]
57-
pub use rustc_unicode::str::SplitWhitespace;
57+
pub use std_unicode::str::SplitWhitespace;
5858
#[stable(feature = "rust1", since = "1.0.0")]
5959
pub use core::str::pattern;
6060

@@ -1705,7 +1705,7 @@ impl str {
17051705
}
17061706

17071707
fn case_ignoreable_then_cased<I: Iterator<Item = char>>(iter: I) -> bool {
1708-
use rustc_unicode::derived_property::{Cased, Case_Ignorable};
1708+
use std_unicode::derived_property::{Cased, Case_Ignorable};
17091709
match iter.skip_while(|&c| Case_Ignorable(c)).next() {
17101710
Some(c) => Cased(c),
17111711
None => false,

src/libcollections/string.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ use core::mem;
6363
use core::ops::{self, Add, AddAssign, Index, IndexMut};
6464
use core::ptr;
6565
use core::str::pattern::Pattern;
66-
use rustc_unicode::char::{decode_utf16, REPLACEMENT_CHARACTER};
67-
use rustc_unicode::str as unicode_str;
66+
use std_unicode::char::{decode_utf16, REPLACEMENT_CHARACTER};
67+
use std_unicode::str as unicode_str;
6868

6969
use borrow::{Cow, ToOwned};
7070
use range::RangeArgument;

src/libcollectionstest/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
extern crate collections;
3535
extern crate test;
36-
extern crate rustc_unicode;
36+
extern crate std_unicode;
3737

3838
use std::hash::{Hash, Hasher};
3939
use std::collections::hash_map::DefaultHasher;

src/libcollectionstest/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ fn from_utf8_mostly_ascii() {
530530

531531
#[test]
532532
fn test_is_utf16() {
533-
use rustc_unicode::str::is_utf16;
533+
use std_unicode::str::is_utf16;
534534

535535
macro_rules! pos {
536536
($($e:expr),*) => { { $(assert!(is_utf16($e));)* } }
@@ -1186,7 +1186,7 @@ fn test_rev_split_char_iterator_no_trailing() {
11861186

11871187
#[test]
11881188
fn test_utf16_code_units() {
1189-
use rustc_unicode::str::Utf16Encoder;
1189+
use std_unicode::str::Utf16Encoder;
11901190
assert_eq!(Utf16Encoder::new(vec!['é', '\u{1F4A9}'].into_iter()).collect::<Vec<u16>>(),
11911191
[0xE9, 0xD83D, 0xDCA9])
11921192
}

src/libcollectionstest/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!(::rustc_unicode::str::is_utf16(&u));
135+
assert!(::std_unicode::str::is_utf16(&u));
136136
assert_eq!(s_as_utf16, u);
137137

138138
assert_eq!(u_as_string, s);

0 commit comments

Comments
 (0)