about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorkwantam <kwantam@gmail.com>2015-04-14 15:52:37 -0400
committerkwantam <kwantam@gmail.com>2015-04-16 17:03:05 -0400
commit29d1252e4d2126318d7f622505ed76dd1e8e4edc (patch)
tree921b91ee89c9262e2223d666f26ffded1bcda26f /src/libstd
parent288809c8f35d9b37f2e4f5c3ac168f56dbc3bbc4 (diff)
downloadrust-29d1252e4d2126318d7f622505ed76dd1e8e4edc.tar.gz
rust-29d1252e4d2126318d7f622505ed76dd1e8e4edc.zip
deprecate Unicode functions that will be moved to crates.io
This patch
1. renames libunicode to librustc_unicode,
2. deprecates several pieces of libunicode (see below), and
3. removes references to deprecated functions from
   librustc_driver and libsyntax. This may change pretty-printed
   output from these modules in cases involving wide or combining
   characters used in filenames, identifiers, etc.

The following functions are marked deprecated:

1. char.width() and str.width():
   --> use unicode-width crate

2. str.graphemes() and str.grapheme_indices():
   --> use unicode-segmentation crate

3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(),
   char.compose(), char.decompose_canonical(), char.decompose_compatible(),
   char.canonical_combining_class():
   --> use unicode-normalization crate
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/mod.rs2
-rw-r--r--src/libstd/lib.rs4
-rw-r--r--src/libstd/sys/common/wtf8.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 07b43b6c5db..e8d15a95b80 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -13,7 +13,7 @@
 #![stable(feature = "rust1", since = "1.0.0")]
 
 use cmp;
-use unicode::str as core_str;
+use rustc_unicode::str as core_str;
 use error as std_error;
 use fmt;
 use iter::{self, Iterator, Extend};
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index b2bcbaa7b1c..4452a4457ac 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -151,7 +151,7 @@ extern crate collections as core_collections;
 
 #[allow(deprecated)] extern crate rand as core_rand;
 extern crate alloc;
-extern crate unicode;
+extern crate rustc_unicode;
 extern crate libc;
 
 #[macro_use] #[no_link] extern crate rustc_bitflags;
@@ -196,7 +196,7 @@ pub use core_collections::string;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use core_collections::vec;
 
-pub use unicode::char;
+pub use rustc_unicode::char;
 
 /* Exported macros */
 
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs
index 34a4a773f8e..aa035a18437 100644
--- a/src/libstd/sys/common/wtf8.rs
+++ b/src/libstd/sys/common/wtf8.rs
@@ -44,7 +44,7 @@ use slice;
 use str;
 use string::String;
 use sys_common::AsInner;
-use unicode::str::{Utf16Item, utf16_items};
+use rustc_unicode::str::{Utf16Item, utf16_items};
 use vec::Vec;
 
 const UTF8_REPLACEMENT_CHARACTER: &'static [u8] = b"\xEF\xBF\xBD";