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

+7-7
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

+1-1
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

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/libcollections/Cargo.toml

+1-1
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

+1-1
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

+4-4
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

+2-2
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

+1-1
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

+2-2
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

+1-1
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);

src/libcore/char.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Character manipulation.
1212
//!
13-
//! For more details, see ::rustc_unicode::char (a.k.a. std::char)
13+
//! For more details, see ::std_unicode::char (a.k.a. std::char)
1414
1515
#![allow(non_snake_case)]
1616
#![stable(feature = "core_char", since = "1.2.0")]

src/libcoretest/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
extern crate core;
4141
extern crate test;
4242
extern crate libc;
43-
extern crate rustc_unicode;
43+
extern crate std_unicode;
4444
extern crate rand;
4545

4646
mod any;

src/librustc_errors/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern crate term;
3131
extern crate log;
3232
#[macro_use]
3333
extern crate libc;
34-
extern crate rustc_unicode;
34+
extern crate std_unicode;
3535
extern crate serialize as rustc_serialize; // used by deriving
3636
extern crate syntax_pos;
3737

src/librustdoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extern crate serialize;
4545
#[macro_use] extern crate syntax;
4646
extern crate syntax_pos;
4747
extern crate test as testing;
48-
extern crate rustc_unicode;
48+
extern crate std_unicode;
4949
#[macro_use] extern crate log;
5050
extern crate rustc_errors as errors;
5151

src/librustdoc/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ pub fn maketest(s: &str, cratename: Option<&str>, dont_insert_main: bool,
345345
}
346346

347347
fn partition_source(s: &str) -> (String, String) {
348-
use rustc_unicode::str::UnicodeStr;
348+
use std_unicode::str::UnicodeStr;
349349

350350
let mut after_header = false;
351351
let mut before = String::new();

src/libserialize/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Core encoding and decoding interfaces.
4141
#[cfg(test)] extern crate test;
4242
#[macro_use] extern crate log;
4343

44-
extern crate rustc_unicode;
44+
extern crate std_unicode;
4545
extern crate collections;
4646

4747
pub use self::serialize::{Decoder, Encoder, Decodable, Encodable};

src/libstd/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ core = { path = "../libcore" }
2020
libc = { path = "../rustc/libc_shim" }
2121
rand = { path = "../librand" }
2222
compiler_builtins = { path = "../libcompiler_builtins" }
23-
rustc_unicode = { path = "../librustc_unicode" }
23+
std_unicode = { path = "../libstd_unicode" }
2424
unwind = { path = "../libunwind" }
2525

2626
[build-dependencies]

src/libstd/io/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
#![stable(feature = "rust1", since = "1.0.0")]
257257

258258
use cmp;
259-
use rustc_unicode::str as core_str;
259+
use std_unicode::str as core_str;
260260
use error as std_error;
261261
use fmt;
262262
use result;

src/libstd/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ extern crate collections as core_collections;
323323

324324
#[allow(deprecated)] extern crate rand as core_rand;
325325
extern crate alloc;
326-
extern crate rustc_unicode;
326+
extern crate std_unicode;
327327
extern crate libc;
328328

329329
// We always need an unwinder currently for backtraces
@@ -420,7 +420,7 @@ pub use core_collections::string;
420420
#[stable(feature = "rust1", since = "1.0.0")]
421421
pub use core_collections::vec;
422422
#[stable(feature = "rust1", since = "1.0.0")]
423-
pub use rustc_unicode::char;
423+
pub use std_unicode::char;
424424

425425
pub mod f32;
426426
pub mod f64;

src/librustc_unicode/Cargo.toml renamed to src/libstd_unicode/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
authors = ["The Rust Project Developers"]
3-
name = "rustc_unicode"
3+
name = "std_unicode"
44
version = "0.0.0"
55

66
[lib]
7-
name = "rustc_unicode"
7+
name = "std_unicode"
88
path = "lib.rs"
99
test = false
1010
bench = false
File renamed without changes.

src/librustc_unicode/lib.rs renamed to src/libstd_unicode/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//! provide for basic string-related manipulations. This crate does not
2121
//! (yet) aim to provide a full set of Unicode tables.
2222
23-
#![crate_name = "rustc_unicode"]
23+
#![crate_name = "std_unicode"]
2424
#![unstable(feature = "unicode", issue = "27783")]
2525
#![crate_type = "rlib"]
2626
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
File renamed without changes.
File renamed without changes.

src/libsyntax/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extern crate term;
4141
extern crate libc;
4242
#[macro_use] extern crate log;
4343
#[macro_use] #[no_link] extern crate rustc_bitflags;
44-
extern crate rustc_unicode;
44+
extern crate std_unicode;
4545
pub extern crate rustc_errors as errors;
4646
extern crate syntax_pos;
4747
extern crate rustc_data_structures;

src/libsyntax/parse/lexer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use ext::tt::transcribe::tt_next_token;
1616
use parse::token;
1717
use str::char_at;
1818
use symbol::{Symbol, keywords};
19-
use rustc_unicode::property::Pattern_White_Space;
19+
use std_unicode::property::Pattern_White_Space;
2020

2121
use std::borrow::Cow;
2222
use std::char;

0 commit comments

Comments
 (0)