summary refs log tree commit diff
path: root/src/libstd_unicode/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-04-12Mark the rest of the `unicode` feature flag as perma-unstable.Simon Sapin-1/+1
2018-04-12Deprecate the std_unicode crateSimon Sapin-0/+1
2018-04-12Move contents of libstd_unicode into libcoreSimon Sapin-30/+2
2018-04-12Move Utf8Lossy decoder to libcoreSimon Sapin-1/+0
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-1/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-03-26Stabilize the TryFrom and TryInto traitsSimon Sapin-1/+0
Tracking issue: https://github.com/rust-lang/rust/issues/33417
2018-03-03core: Stabilize FusedIteratorUlrik Sverdrup-1/+0
FusedIterator is a marker trait that promises that the implementing iterator continues to return `None` from `.next()` once it has returned `None` once (and/or `.next_back()`, if implemented). The effects of FusedIterator are already widely available through `.fuse()`, but with stable `FusedIterator`, stable Rust users can implement this trait for their iterators when appropriate.
2018-01-02Move static code outside of unciode.py.Clar Charr-1/+4
2017-11-22Add missing Debug impls to std_unicodeOliver Middleton-0/+1
Also adds #![deny(missing_debug_implementations)] so they don't get missed again.
2017-11-03Mark several ascii methods as unstable againLukas Kalbertodt-0/+1
We don't want to stabilize them now already. The goal of this set of commits is just to add inherent methods to the four types. Stabilizing all of those methods can be done later.
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-2/+0
Fixes #41701.
2017-08-13std: Respect formatting flags for str-like OsStrAlex Crichton-1/+0
Historically many `Display` and `Debug` implementations for `OsStr`-like abstractions have gone through `String::from_utf8_lossy`, but this was updated in #42613 to use an internal `Utf8Lossy` abstraction instead. This had the unfortunate side effect of causing a regression (#43765) in code which relied on these `fmt` trait implementations respecting the various formatting flags specified. This commit opportunistically adds back interpretation of formatting trait flags in the "common case" where where `OsStr`-like "thing" is all valid utf-8 and can delegate to the formatting implementation for `str`. This doesn't entirely solve the regression as non-utf8 paths will format differently than they did before still (in that they will not respect formatting flags), but this should solve the regression for all "real world" use cases of paths and such. The door's also still open for handling these flags in the future! Closes #43765
2017-07-25std: Stabilize `char_escape_debug`Alex Crichton-1/+0
Stabilizes: * `<char>::escape_debug` * `std::char::EscapeDebug` Closes #35068
2017-06-15Utf8Lossy type with chunks iterator and impl Display and DebugStepan Koltsov-0/+3
2017-06-13Merge crate `collections` into `alloc`Murarth-1/+1
2017-04-30std_unicode: impl Clone for .split_whitespace()Ulrik Sverdrup-0/+2
Use custom closure structs for the predicates so that the iterator's clone can simply be derived. This should also reduce virtual call overhead by not using function pointers.
2017-03-02Remove std_unicode::str::is_utf16Simon Sapin-1/+0
It was only accessible through the `#[unstable]` crate std_unicode. It has never been used in the compiler or standard library since 47e7a05a28c9662159af2d2e0f2b7efc13fa09cb added it in 2012 “for OS API interop”. It can be replaced with a one-liner: ```rust fn is_utf16(slice: &[u16]) -> bool { std::char::decode_utf16(s.iter().cloned()).all(|r| r.is_ok()) } ```
2017-03-01Only keep one copy of the UTF8_CHAR_WIDTH table.Simon Sapin-1/+1
… instead of one of each of libcore and libstd_unicode. Move the `utf8_char_width` function to `core::str` under the `str_internals` unstable feature.
2016-12-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-16Address falloutAaron Turon-1/+0
2016-11-30Rename 'librustc_unicode' crate to 'libstd_unicode'.Corey Farwell-0/+63
Fixes #26554.