Skip to content

Commit 274777a

Browse files
frewsxcvCorey Farwell
authored and
Corey Farwell
committed
Rename 'librustc_unicode' crate to 'libstd_unicode'.
Fixes rust-lang#26554.
1 parent f50dbd5 commit 274777a

File tree

26 files changed

+44
-44
lines changed

26 files changed

+44
-44
lines changed

Diff for: 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,11 +69,11 @@ DEPS_compiler_builtins := core
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
@@ -85,7 +85,7 @@ RUSTFLAGS1_panic_abort := -C panic=abort
8585
RUSTFLAGS2_panic_abort := -C panic=abort
8686
RUSTFLAGS3_panic_abort := -C panic=abort
8787

88-
DEPS_std := core libc rand alloc collections compiler_builtins rustc_unicode \
88+
DEPS_std := core libc rand alloc collections compiler_builtins std_unicode \
8989
native:backtrace \
9090
alloc_system panic_abort panic_unwind unwind
9191
DEPS_arena := std
@@ -100,7 +100,7 @@ DEPS_serialize := std log
100100
DEPS_term := std
101101
DEPS_test := std getopts term native:rust_test_helpers
102102

103-
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode rustc_errors syntax_pos rustc_data_structures
103+
DEPS_syntax := std term serialize log arena libc rustc_bitflags std_unicode rustc_errors syntax_pos rustc_data_structures
104104
DEPS_syntax_ext := syntax syntax_pos rustc_errors fmt_macros proc_macro
105105
DEPS_syntax_pos := serialize
106106
DEPS_proc_macro_tokens := syntax syntax_pos log
@@ -162,7 +162,7 @@ ONLY_RLIB_libc := 1
162162
ONLY_RLIB_alloc := 1
163163
ONLY_RLIB_rand := 1
164164
ONLY_RLIB_collections := 1
165-
ONLY_RLIB_rustc_unicode := 1
165+
ONLY_RLIB_std_unicode := 1
166166
ONLY_RLIB_rustc_bitflags := 1
167167
ONLY_RLIB_alloc_system := 1
168168
ONLY_RLIB_alloc_jemalloc := 1
@@ -173,7 +173,7 @@ ONLY_RLIB_unwind := 1
173173
TARGET_SPECIFIC_alloc_jemalloc := 1
174174

175175
# Documented-by-default crates
176-
DOC_CRATES := std alloc collections core libc rustc_unicode
176+
DOC_CRATES := std alloc collections core libc std_unicode
177177

178178
ifeq ($(CFG_DISABLE_JEMALLOC),)
179179
RUSTFLAGS_rustc_back := --cfg 'feature="jemalloc"'

Diff for: 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

Diff for: src/Cargo.lock

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

Diff for: 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"

Diff for: 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)]

Diff for: 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,

Diff for: 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;

Diff for: src/libcollectionstest/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
extern crate collections;
3434
extern crate test;
35-
extern crate rustc_unicode;
35+
extern crate std_unicode;
3636

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

Diff for: 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
}

Diff for: 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);

Diff for: 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")]

Diff for: 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;

Diff for: src/librustc_errors/lib.rs

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

Diff for: src/librustdoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ extern crate serialize;
4747
#[macro_use] extern crate syntax;
4848
extern crate syntax_pos;
4949
extern crate test as testing;
50-
extern crate rustc_unicode;
50+
extern crate std_unicode;
5151
#[macro_use] extern crate log;
5252
extern crate rustc_errors as errors;
5353

Diff for: 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();

Diff for: src/libserialize/lib.rs

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

45-
extern crate rustc_unicode;
45+
extern crate std_unicode;
4646
extern crate collections;
4747

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

Diff for: 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]

Diff for: 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;

Diff for: src/libstd/lib.rs

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

325325
#[allow(deprecated)] extern crate rand as core_rand;
326326
extern crate alloc;
327-
extern crate rustc_unicode;
327+
extern crate std_unicode;
328328
extern crate libc;
329329

330330
// We always need an unwinder currently for backtraces
@@ -421,7 +421,7 @@ pub use core_collections::string;
421421
#[stable(feature = "rust1", since = "1.0.0")]
422422
pub use core_collections::vec;
423423
#[stable(feature = "rust1", since = "1.0.0")]
424-
pub use rustc_unicode::char;
424+
pub use std_unicode::char;
425425

426426
pub mod f32;
427427
pub mod f64;

Diff for: 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.

Diff for: 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.

Diff for: src/libsyntax/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern crate term;
4343
extern crate libc;
4444
#[macro_use] extern crate log;
4545
#[macro_use] #[no_link] extern crate rustc_bitflags;
46-
extern crate rustc_unicode;
46+
extern crate std_unicode;
4747
pub extern crate rustc_errors as errors;
4848
extern crate syntax_pos;
4949
extern crate rustc_data_structures;

Diff for: 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)