about summary refs log tree commit diff
path: root/src/librustc_unicode
AgeCommit message (Collapse)AuthorLines
2015-11-25Rollup merge of #30013 - steveklabnik:doc_char, r=brsonManish Goregaokar-3/+8
Part of https://github.com/rust-lang/rust/issues/29333
2015-11-24Fix up docs for charSteve Klabnik-3/+8
Part of https://github.com/rust-lang/rust/issues/29333
2015-11-20Rename #[deprecated] to #[rustc_deprecated]Vadim Petrochenkov-4/+7
2015-11-18Add missing annotations and some testsVadim Petrochenkov-0/+2
2015-11-12librustc_unicode: deny warnings in doctestsKevin Butler-1/+2
2015-11-06Remove stability annotations from trait impl itemsVadim Petrochenkov-1/+0
Remove `stable` stability annotations from inherent impls
2015-10-26rustfmt librustc_unicodeCorentin Henry-48/+94
2015-10-25std: Stabilize library APIs for 1.5Alex Crichton-1/+0
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-06Write a bunch of docs for charSteve Klabnik-75/+392
Mostly adding examples, and reformatting for consistency.
2015-08-23Refactor low-level UTF-16 decoding.Simon Sapin-39/+138
* 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-16rustdoc: Added issue_tracker_base_url annotations to cratesMartin Wernstål-0/+1
2015-08-16Auto merge of #27853 - seckar:master, r=steveklabnikbors-1/+1
2015-08-15Fix typo in doc string.Nicholas Seckar-1/+1
2015-08-15rustc_unicode: Add issues for unstable featuresAlex Crichton-5/+9
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-5111/+1338
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-11rollup merge of #27678: alexcrichton/snapshotsAlex Crichton-5/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-11rollup merge of #27622: eefriedman/https-urlAlex Crichton-3/+3
Also fixes a few outdated links.
2015-08-11Register new snapshotsAlex Crichton-5/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-09Use https URLs to refer to rust-lang.org where appropriate.Eli Friedman-3/+3
Also fixes a few outdated links.
2015-08-09Replace many uses of `mem::transmute` with more specific functionsTobias Bucher-12/+10
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-4/+4
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-5/+10
2015-07-23wtf8, char: Replace uses of `mem::transmute` with more specific functionsTobias Bucher-1/+1
2015-07-20std: Create separate docs for the primitivesBrian Anderson-4/+5
Having the primitive and module docs derived from the same source causes problems, primarily that they can't contain hyperlinks cross-referencing each other. This crates dedicated private modules in `std` to document the primitive types, then for all primitives that have a corresponding module, puts hyperlinks in moth the primitive docs and the module docs cross-linking each other. This should help clear up confusion when readers find themselves on the wrong page.
2015-07-20doc: Clean up primitive short descriptionsBrian Anderson-1/+1
This makes the primitive descriptions on the front page read properly as descriptions of types and not of the associated modules.
2015-06-24Remove char::to_titlecase. Fix #26555Simon Sapin-553/+0
I added it because it was easy (same a `char::to_lowercase`, just a different table), but it doesn’t make sense to have this in std but not str::to_titlecase, which would require https://github.com/unicode-rs/unicode-segmentation At some point in the future this feature will be available (both on char and str) in a crates.io crate.
2015-06-17Fallout in tests and docs from feature renamingsAlex Crichton-1/+1
2015-06-17collections: Split the `collections` featureAlex Crichton-3/+9
This commit also deprecates the `as_string` and `as_slice` free functions in the `string` and `vec` modules.
2015-06-17core: Split apart the global `core` featureAlex Crichton-5/+11
This commit shards the broad `core` feature of the libcore library into finer grained features. This split groups together similar APIs and enables tracking each API separately, giving a better sense of where each feature is within the stabilization process. A few minor APIs were deprecated along the way: * Iterator::reverse_in_place * marker::NoCopy
2015-06-13Rollup merge of #26260 - tshepang:improve-example, r=steveklabnikManish Goregaokar-10/+4
2015-06-13doc: 'c' feels more suitable than 'i' for representing charactersTshepang Lekhonkhobe-2/+2
2015-06-12doc: improve escape_unicode exampleTshepang Lekhonkhobe-9/+3
Looks better without all that wasted whitespace
2015-06-12doc: add examples for to_uppercase and to_lowercaseTshepang Lekhonkhobe-0/+12
2015-06-11Rollup merge of #26195 - tshepang:patch-1, r=alexcrichtonManish Goregaokar-1/+1
2015-06-11Auto merge of #26154 - pmarcelll:master, r=Gankrobors-0/+8
Various methods in both libcore/char.rs and librustc_unicode/char.rs were previously marked with #[inline], now every method is marked in char's impl blocks. Partially fixes #26124. EDIT: I'm not familiar with pull reqests (yet), apparently Github added my second commit to thit PR... Fixes #26124
2015-06-11doc: typo fixTshepang Lekhonkhobe-1/+1
2015-06-09Add missing #[inline] to methods related to char.marcell-0/+8
2015-06-08Address a review comment and fix a bootstrapping issueSimon Sapin-2/+2
2015-06-06Mark str::to_uppercase and str::to_lowercase as stable.Simon Sapin-3/+3
2015-06-06Correctly map upper-case Sigma to lower-case in word-final position. Fix #26035.Simon Sapin-0/+156
2015-06-06Add char::to_titlecaseSimon Sapin-0/+553
But not str::to_titlecase which would require UAX#29 Unicode Text Segmentation which we decided not to include in of `std`: https://github.com/rust-lang/rfcs/pull/1054
2015-06-06Add complex (but unconditional) Unicode case mapping. Fix #25800Simon Sapin-660/+1077
As a result, the iterator returned by `char::to_uppercase` sometimes yields two or three `char`s instead of just one.
2015-06-06to_lowercase/to_uppercase: also map chars not in Lu/Ll categories.Simon Sapin-516/+550
This adds 120 mappings: Dž dž Dž DŽ Lj lj Lj LJ Nj nj Nj NJ Dz dz Dz DZ Ι ᾈ ᾀ ᾉ ᾁ ᾊ ᾂ ᾋ ᾃ ᾌ ᾄ ᾍ ᾅ ᾎ ᾆ ᾏ ᾇ ᾘ ᾐ ᾙ ᾑ ᾚ ᾒ ᾛ ᾓ ᾜ ᾔ ᾝ ᾕ ᾞ ᾖ ᾟ ᾗ ᾨ ᾠ ᾩ ᾡ ᾪ ᾢ ᾫ ᾣ ᾬ ᾤ ᾭ ᾥ ᾮ ᾦ ᾯ ᾧ ᾼ ᾳ ῌ ῃ ῼ ῳ Ⅰ ⅰ Ⅱ ⅱ Ⅲ ⅲ Ⅳ ⅳ Ⅴ ⅴ Ⅵ ⅵ Ⅶ ⅶ Ⅷ ⅷ Ⅸ ⅸ Ⅹ ⅹ Ⅺ ⅺ Ⅻ ⅻ Ⅼ ⅼ Ⅽ ⅽ Ⅾ ⅾ Ⅿ ⅿ ⅰ Ⅰ ⅱ Ⅱ ⅲ Ⅲ ⅳ Ⅳ ⅴ Ⅴ ⅵ Ⅵ ⅶ Ⅶ ⅷ Ⅷ ⅸ Ⅸ ⅹ Ⅹ ⅺ Ⅺ ⅻ Ⅻ ⅼ Ⅼ ⅽ Ⅽ ⅾ Ⅾ ⅿ Ⅿ Ⓐ ⓐ Ⓑ ⓑ Ⓒ ⓒ Ⓓ ⓓ Ⓔ ⓔ Ⓕ ⓕ Ⓖ ⓖ Ⓗ ⓗ Ⓘ ⓘ Ⓙ ⓙ Ⓚ ⓚ Ⓛ ⓛ Ⓜ ⓜ Ⓝ ⓝ Ⓞ ⓞ Ⓟ ⓟ Ⓠ ⓠ Ⓡ ⓡ Ⓢ ⓢ Ⓣ ⓣ Ⓤ ⓤ Ⓥ ⓥ Ⓦ ⓦ Ⓧ ⓧ Ⓨ ⓨ Ⓩ ⓩ ⓐ Ⓐ ⓑ Ⓑ ⓒ Ⓒ ⓓ Ⓓ ⓔ Ⓔ ⓕ Ⓕ ⓖ Ⓖ ⓗ Ⓗ ⓘ Ⓘ ⓙ Ⓙ ⓚ Ⓚ ⓛ Ⓛ ⓜ Ⓜ ⓝ Ⓝ ⓞ Ⓞ ⓟ Ⓟ ⓠ Ⓠ ⓡ Ⓡ ⓢ Ⓢ ⓣ Ⓣ ⓤ Ⓤ ⓥ Ⓥ ⓦ Ⓦ ⓧ Ⓧ ⓨ Ⓨ ⓩ Ⓩ
2015-05-19doc: fix a broken linkparir-1/+1
2015-05-15libs: Move favicon URLs to HTTPSAlex Crichton-1/+1
Helps prevent mixed content warnings if accessing docs over HTTPS. Closes #25459
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-6/+20
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-18optimize Unicode tableskwantam-894/+648
Apply optimization described in https://github.com/rust-lang/regex/pull/73#issuecomment-93777126 to rust's copy of `unicode.py`. This shrinks librustc_unicode's tables.rs from 479kB to 456kB, and should improve performance slightly for related operations (e.g., is_alphabetic(), is_xid_start(), etc). In addition, pull in fix from @dscorbett's commit d25c39f86568a147f9b7080c25711fb1f98f056a in regex, which makes `load_properties()` more tolerant of whitespace in the Unicode tables. (This fix does not result in any changes to tables.rs, but could if the Unicode tables change in the future.)