Auto merge of #49698 - SimonSapin:unicode-for-everyone, r=alexcrichton

Merge the std_unicode crate into the core crate

[The standard library facade](https://github.com/rust-lang/rust/issues/27783) has historically contained a number of crates with different roles, but that number has decreased over time. `rand` and `libc` have moved to crates.io, and [`collections` was merged into `alloc`](https://github.com/rust-lang/rust/pull/42648). Today we have `core` that applies everywhere, `std` that expects a full operating system, and `alloc` in-between that only requires a memory allocator (which can be provided by users)… and `std_unicode`, which doesn’t really have a reason to be separate anymore. It contains functionality based on Unicode data tables that can be large, but as long as relevant functions are not called the tables should be removed from binaries by linkers.

This deprecates the unstable `std_unicode` crate and moves all of its contents into `core`, replacing them with `pub use` reexports. The crate can be removed later. This also removes the `CharExt` trait (replaced with inherent methods in libcore) and `UnicodeStr` trait (merged into `StrExt`). There traits were both unstable and not intended to be used or named directly.

A number of new items are newly-available in libcore and instantly stable there, but only if they were already stable in libstd.

Fixes #49319.
This commit is contained in:
bors
2018-04-12 00:35:33 +00:00
42 changed files with 1398 additions and 1537 deletions

View File

@@ -19,7 +19,7 @@
html_root_url = "https://doc.rust-lang.org/nightly/",
test(attr(deny(warnings))))]
#![feature(unicode)]
#![feature(unicode_internals)]
#![feature(rustc_diagnostic_macros)]
#![feature(slice_sort_by_cached_key)]
#![feature(non_exhaustive)]
@@ -33,9 +33,9 @@
extern crate rustc_cratesio_shim;
#[macro_use] extern crate bitflags;
extern crate core;
extern crate serialize;
#[macro_use] extern crate log;
extern crate std_unicode;
pub extern crate rustc_errors as errors;
extern crate syntax_pos;
extern crate rustc_data_structures;