about summary refs log tree commit diff
path: root/src/librustc_unicode/u_str.rs
AgeCommit message (Collapse)AuthorLines
2016-11-30Rename 'librustc_unicode' crate to 'libstd_unicode'.Corey Farwell-201/+0
Fixes #26554.
2016-10-01std: Correct stability attributes for some implementationsOliver Middleton-0/+3
These are displayed by rustdoc so should be correct.
2016-09-28[breaking-change] std: change `encode_utf{8,16}()` to take a buffer and ↵tormol-5/+5
return a slice They panic if the buffer is too small.
2016-08-18Add a FusedIterator trait.Steven Allen-1/+8
This trait can be used to avoid the overhead of a fuse wrapper when an iterator is already well-behaved. Conforming to: RFC 1581 Closes: #35602
2016-06-05run rustfmt on librustc_unicodeSrinivas Reddy Thatiparthy-1/+3
2016-03-22std: Change `encode_utf{8,16}` to return iteratorsAlex Crichton-5/+5
Currently these have non-traditional APIs which take a buffer and report how much was filled in, but they're not necessarily ergonomic to use. Returning an iterator which *also* exposes an underlying slice shouldn't result in any performance loss as it's just a lazy version of the same implementation, and it's also much more ergonomic! cc #27784
2016-02-18Remove unnecessary explicit lifetime bounds.Corey Farwell-3/+3
These explicit lifetimes can be ommitted because of lifetime elision rules. Instances were found using rust-clippy.
2015-12-10std: Remove deprecated functionality from 1.5Alex Crichton-94/+1
This is a standard "clean out libstd" commit which removes all 1.5-and-before deprecated functionality as it's now all been deprecated for at least one entire cycle.
2015-11-20Rename #[deprecated] to #[rustc_deprecated]Vadim Petrochenkov-4/+5
2015-11-12librustc_unicode: deny warnings in doctestsKevin Butler-0/+1
2015-10-26rustfmt librustc_unicodeCorentin Henry-20/+42
2015-08-23Refactor low-level UTF-16 decoding.Simon Sapin-39/+24
* Rename `utf16_items` to `decode_utf16`. "Items" is meaningless. * Move it to `rustc_unicode::char`, exposed in `std::char`. * Generalize it to any `u16` iterable, not just `&[u16]`. * Make it yield `Result` instead of a custom `Utf16Item` enum that was isomorphic to `Result`. This enable using the `FromIterator for Result` impl. * Add a `REPLACEMENT_CHARACTER` constant. * Document how `result.unwrap_or(REPLACEMENT_CHARACTER)` replaces `Utf16Item::to_char_lossy`.
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-296/+0
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-08-11Register new snapshotsAlex Crichton-2/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-09Replace many uses of `mem::transmute` with more specific functionsTobias Bucher-3/+2
The replacements are functions that usually use a single `mem::transmute` in their body and restrict input and output via more concrete types than `T` and `U`. Worth noting are the `transmute` functions for slices and the `from_utf8*` family for mutable slices. Additionally, `mem::transmute` was often used for casting raw pointers, when you can already cast raw pointers just fine with `as`.
2015-08-03syntax: Implement #![no_core]Alex Crichton-1/+2
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-07-27Show appropriate feature flags in docsSteve Klabnik-1/+2
2015-04-30Replaces instanced of 'an UTF' with 'a UTF'Corey Farwell-1/+1
Even spelled out, one would say 'a Universal Character Set'
2015-04-21implement rfc 1054: split_whitespace() fn, deprecate words()kwantam-5/+19
For now, words() is left in (but deprecated), and Words is a type alias for struct SplitWhitespace. Also cleaned up references to s.words() throughout codebase. Closes #15628
2015-04-21unstabilize Words structkwantam-1/+2
Words struct was stabilied by mistake. Unstabilize.
2015-04-21Model lexer: Fix remaining issuesPiotr Czarnecki-2/+0
2015-04-16deprecate Unicode functions that will be moved to crates.iokwantam-0/+557
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