about summary refs log tree commit diff
path: root/src/libstd_unicode
AgeCommit message (Collapse)AuthorLines
2018-07-30Remove the unstable std_unicode crate, deprecated since 1.27Simon Sapin-50/+0
Its former contents are now in libcore.
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-4789/+2
2018-04-12Move Utf8Lossy decoder to libcoreSimon Sapin-324/+0
2018-04-12Move char::REPLACEMENT_CHARACTER to libcoreSimon Sapin-8/+2
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-04-07Inject the `compiler_builtins` crate whenever the `core` crate is injectedOliver Schneider-0/+1
2018-03-26Stabilize the TryFrom and TryInto traitsSimon Sapin-2/+1
Tracking issue: https://github.com/rust-lang/rust/issues/33417
2018-03-06Rollup merge of #47463 - bluss:fused-iterator, r=alexcrichtonkennytm-5/+3
Stabilize FusedIterator 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. Closes #35602
2018-03-03core: Update stability attributes for FusedIteratorUlrik Sverdrup-4/+3
2018-03-03core: Stabilize FusedIteratorUlrik Sverdrup-5/+4
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-02-28impl Clone for ::std_unicode::char::{ToLowercase, ToUppercase}M Farkas-Dyck-3/+3
2018-02-24Fixes docs for ASCII functions to no longer claim U+0021 is '@'.Nathan Ringo-1/+1
2018-01-15Reexport -> re-export in prose and documentation commentsCarol (Nichols || Goulding)-2/+2
2018-01-02Move static code outside of unciode.py.Clar Charr-225/+143
2017-12-12Auto merge of #46411 - rillian:str_ascii, r=kennytmbors-6/+6
Mark ascii methods on primitive types stable in 1.23.0 not 1.21.0. The ascii_methods_on_intrinsics feature stabilization didn't land in time for 1.21.0. Update the annotation so the documentation is correct about when these methods became available.
2017-12-09Use Try syntax for Option in place of macros or matchMatt Brubeck-6/+1
2017-12-03Rollup merge of #46432 - tromey:doc-fix-46307, r=estebankCorey Farwell-1/+1
Fix documentation for DecodeUtf16Error Fixes #46307
2017-12-02Mark ascii methods on primitive types stable in 1.23.0.Ralph Giles-6/+6
The ascii_methods_on_intrinsics feature stabilization didn't land in time for 1.21.0. Update the annotation so the documentation is correct about when these methods became available.
2017-12-01Fix documentation for DecodeUtf16ErrorTom Tromey-1/+1
Fixes #46307
2017-11-29Rollup merge of #46077 - LukasKalbertodt:stabilize-ascii-ctype, r=alexcrichtonkennytm-10/+10
Stabilize some `ascii_ctype` methods As discussed in #39658, this PR stabilizes those methods for `u8` and `char`. All inherent `ascii_ctype` for `[u8]` and `str` are removed as we prefer the more explicit version `s.chars().all(|c| c.is_ascii_())`. This PR doesn't modify the `AsciiExt` trait. There, the `ascii_ctype` methods are still unstable. It is planned to remove those in the future (I think). I had to modify some code in `ascii.rs` to properly implement `AsciiExt` for all types. Fixes #39658.
2017-11-28Change `since` attribute from ctype methods from 1.23 to 1.24Lukas Kalbertodt-10/+10
The changes didn't land in time for 1.23 and stabilizations won't be backported to beta.
2017-11-22Add missing Debug impls to std_unicodeOliver Middleton-1/+7
Also adds #![deny(missing_debug_implementations)] so they don't get missed again.
2017-11-18Stabilize `ascii_ctype` methods for `u8` and `char`Lukas Kalbertodt-10/+10
The feature of those methods was renamed to "ascii_ctype_on_intrinsics".
2017-11-16fix some python3 incompatibilitiesCollin Anderson-20/+17
2017-11-14Fixed several pulldown warnings when documenting libstd.kennytm-1/+1
2017-11-03Mark several ascii methods as unstable againLukas Kalbertodt-10/+31
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-11-03Fix lists in doc comments for ascii methods of u8 and charLukas Kalbertodt-2/+4
2017-11-03Copy `AsciiExt` methods to `char` directlyLukas Kalbertodt-0/+501
This is done in order to deprecate AsciiExt eventually.
2017-09-18[libstd_unicode] Expose UnicodeVersion typeBehnam Esfahbod-1/+1
In <https://github.com/rust-lang/rust/pull/42998>, we added an uninstantiable type for the internal `UNICODE_VERSION` value, `UnicodeVersion`, but it was not made public to the outside of the crate, resulting in the value becoming less useful. Here we make the type accessible from the outside. Also add a run-pass test to make sure the type and value can be accessed as intended.
2017-09-03impl Debug for SplitWhitespace.Clar Charr-1/+1
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-2/+0
Fixes #41701.
2017-08-23Auto merge of #43830 - alexcrichton:path-display-regression, r=aturonbors-3/+16
std: Respect formatting flags for str-like OsStr 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-08-15use field init shorthand EVERYWHEREZack M. Davis-1/+1
Like #43008 (f668999), but _much more aggressive_.
2017-08-13std: Respect formatting flags for str-like OsStrAlex Crichton-3/+16
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-08-08Auto merge of #42998 - behnam:uni-ver-type, r=sfacklerbors-6/+52
[libstd_unicode] Change UNICODE_VERSION to use u32 Looks like there's no strong reason to keep these values at `u64`. With the current plans for the Unicode Standard, `u8` should be enough for the next 200 years. To stay on the safe side, I'm using `u16` here. I don't see a reason to go with anything machine-dependent/more-efficient.
2017-07-25std: Stabilize `char_escape_debug`Alex Crichton-5/+1
Stabilizes: * `<char>::escape_debug` * `std::char::EscapeDebug` Closes #35068
2017-07-21[libstd_unicode] Create UnicodeVersion typeBehnam Esfahbod-6/+52
Create named struct `UnicodeVersion` to use instead of tuple type for `UNICODE_VERSION` value. This allows user to access the fields with meaningful field names: `major`, `minor`, and `micro`. Per request, an empty private field is added to the struct, so it can be extended in the future without API breakage.
2017-07-21[libstd_unicode] Change UNICODE_VERSION to use u32Behnam Esfahbod-2/+2
Use `u32` for version components, as `u64` is just an overkill, and `u32` is the default type for integers and the default type used for regular internal numbers. There's no expectation for Unicode Versions to even reach one thousand in the next hundered years. This is different from *package versions*, which may become something auto-generated and exceed human-friendly range of integer values.
2017-07-10Correct some stability attributesOliver Middleton-1/+1
These show up in rustdoc so need to be correct.
2017-06-30[libstd_unicode] Upgrade to Unicode 10.0.0Behnam Esfahbod-155/+168
2017-06-20Rollup merge of #42271 - tinaun:charfromstr, r=alexcrichtonCorey Farwell-0/+2
add `FromStr` Impl for `char` fixes #24939. is it possible to use pub(restricted) instead of using a stability attribute for the internal error representation? is it needed at all?
2017-06-20added `FromStr` Impl for `char`tinaun-0/+2
2017-06-16Rollup merge of #42705 - est31:master, r=alexcrichtonCorey Farwell-4/+4
Introduce tidy lint to check for inconsistent tracking issues This PR * Refactors the collect_lib_features function to work in a non-checking mode (no bad pointer needed, and list of lang features). * Introduces checking whether unstable/stable tags for a given feature have inconsistent tracking issues, as in, multiple tracking issues per feature. * Fixes such inconsistencies throughout the codebase.
2017-06-16Introduce tidy lint to check for inconsistent tracking issuesest31-4/+4
This commit * Refactors the collect_lib_features function to work in a non-checking mode (no bad pointer needed, and list of lang features). * Introduces checking whether unstable/stable tags for a given feature have inconsistent tracking issues. * Fixes such inconsistencies throughout the codebase.
2017-06-15Utf8Lossy type with chunks iterator and impl Display and DebugStepan Koltsov-0/+311
2017-06-13Merge crate `collections` into `alloc`Murarth-2/+2
2017-05-10Auto merge of #41659 - bluss:clone-split-whitespace, r=aturonbors-12/+44
impl Clone for .split_whitespace() 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. Fixes #41655
2017-05-04Move unicode Python script into libstd_unicode crate.Corey Farwell-1/+592
The only place this Python script is used is inside the libstd_unicode crate, so lets move it there.