about summary refs log tree commit diff
path: root/src/libstd/unicode.rs
AgeCommit message (Collapse)AuthorLines
2014-06-05std: Recreate a `collections` moduleAlex Crichton-185/+0
As with the previous commit with `librand`, this commit shuffles around some `collections` code. The new state of the world is similar to that of librand: * The libcollections crate now only depends on libcore and liballoc. * The standard library has a new module, `std::collections`. All functionality of libcollections is reexported through this module. I would like to stress that this change is purely cosmetic. There are very few alterations to these primitives. There are a number of notable points about the new organization: * std::{str, slice, string, vec} all moved to libcollections. There is no reason that these primitives shouldn't be necessarily usable in a freestanding context that has allocation. These are all reexported in their usual places in the standard library. * The `hashmap`, and transitively the `lru_cache`, modules no longer reside in `libcollections`, but rather in libstd. The reason for this is because the `HashMap::new` contructor requires access to the OSRng for initially seeding the hash map. Beyond this requirement, there is no reason that the hashmap could not move to libcollections. I do, however, have a plan to move the hash map to the collections module. The `HashMap::new` function could be altered to require that the `H` hasher parameter ascribe to the `Default` trait, allowing the entire `hashmap` module to live in libcollections. The key idea would be that the default hasher would be different in libstd. Something along the lines of: // src/libstd/collections/mod.rs pub type HashMap<K, V, H = RandomizedSipHasher> = core_collections::HashMap<K, V, H>; This is not possible today because you cannot invoke static methods through type aliases. If we modified the compiler, however, to allow invocation of static methods through type aliases, then this type definition would essentially be switching the default hasher from `SipHasher` in libcollections to a libstd-defined `RandomizedSipHasher` type. This type's `Default` implementation would randomly seed the `SipHasher` instance, and otherwise perform the same as `SipHasher`. This future state doesn't seem incredibly far off, but until that time comes, the hashmap module will live in libstd to not compromise on functionality. * In preparation for the hashmap moving to libcollections, the `hash` module has moved from libstd to libcollections. A previously snapshotted commit enables a distinct `Writer` trait to live in the `hash` module which `Hash` implementations are now parameterized over. Due to using a custom trait, the `SipHasher` implementation has lost its specialized methods for writing integers. These can be re-added backwards-compatibly in the future via default methods if necessary, but the FNV hashing should satisfy much of the need for speedier hashing. A list of breaking changes: * HashMap::{get, get_mut} no longer fails with the key formatted into the error message with `{:?}`, instead, a generic message is printed. With backtraces, it should still be not-too-hard to track down errors. * The HashMap, HashSet, and LruCache types are now available through std::collections instead of the collections crate. * Manual implementations of hash should be parameterized over `hash::Writer` instead of just `Writer`. [breaking-change]
2014-05-13std: Rename str::Normalizations to str::DecompositionsFlorian Zeitz-1/+1
The Normalizations iterator has been renamed to Decompositions. It does not currently include all forms of Unicode normalization, but only encompasses decompositions. If implemented recomposition would likely be a separate iterator which works on the result of this one. [breaking-change]
2014-05-13std, core: Generate unicode.rs using unicode.pyFlorian Zeitz-2/+2
2014-05-07core: Inherit necessary unicode functionalityAlex Crichton-4991/+1
The unicode module remains private, but the normalization iterators require an allocation, so some functionality needs to remain in libstd
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-2/+2
Closes #2569
2014-03-20rename std::vec -> std::sliceDaniel Micay-9/+7
Closes #12702
2014-03-13Remove code duplicationPiotr Zolnierek-48/+22
Remove whitespace Update documentation for to_uppercase, to_lowercase
2014-03-13Implement lower, upper case conversion for charPiotr Zolnierek-0/+1022
2014-03-13std::unicode: remove unused category tablesPiotr Zolnierek-1340/+0
2013-12-08Remove dead codesKiet Tran-0/+1
2013-11-27Fix handling of upper/lowercase, and whitespaceFlorian Zeitz-0/+662
2013-11-27Update Unicode data to version 6.3Florian Zeitz-600/+605
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-4/+4
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-3/+3
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+1
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-09-04stop treating char as an integer typeDaniel Micay-8/+0
Closes #7609
2013-08-21Add canonical combining class to std::unicodeFlorian Zeitz-0/+166
2013-08-21Add Unicode decomposition mappings to std::unicodeFlorian Zeitz-0/+2051
2013-07-01rustc: add a lint to enforce uppercase statics.Huon Wilson-0/+1
2013-06-30Convert vec::{bsearch, bsearch_elem} to methods.Huon Wilson-4/+4
2013-06-30etc: update etc/unicode.py for the changes made to std::unicode.Huon Wilson-2/+1
2013-05-30Require documentation by default for libstdAlex Crichton-0/+2
Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-27Get rid of no-longer-needed #[doc(hidden)] attributes.Lindsey Kuper-2/+0
There were several old `#[doc(hidden)]` attributes in libstd and libextra, left over from when rustdoc didn't hide private definitions, tagged with `FIXME #3538`. Since #3538 is now closed, I removed the `#[doc(hidden)]` attributes as well as the FIXMEs, but I left `#[doc(hidden)]` in libstd/task/spawn.rs and libstd/task/rt.rs since those two are apparently `pub`, as well as in libextra/std.rc since std/extra is `pub`.
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-217/+2613
This only changes the directory names; it does not change the "real" metadata names.
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-8/+8
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-131/+131
2013-03-22libstd: Remove all uses of `pure` from libstd. rs=depurePatrick Walton-6/+6
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-8/+8
2013-03-07libstd: Remove `extern mod { ... }` from libstd. rs=deexterningPatrick Walton-10/+13
2013-01-10librustc: Make all external functions unsafe. r=tjcPatrick Walton-7/+7
2012-12-03Update license, add license boilerplate to most files. Remainder will follow.Graydon Hoare-0/+10
2012-09-28De-mode std::unicode. Part of #3583.Graydon Hoare-146/+143
2012-09-28std: Eliminate deprecated patternsBrian Anderson-1/+0
2012-09-21Install new pub/priv/export rules as defaults, old rules accessible under ↵Graydon Hoare-0/+3
#[legacy_exports];
2012-09-01Confirm demode of unicode.rsKevin Cantu-1/+3
2012-08-01Convert ret to returnBrian Anderson-6/+6
2012-07-03Switch 'native' to 'extern' (or 'foreign' in some descriptions)Graydon Hoare-1/+1
2012-05-03Write unicode::icu::UCHAR_INVALID_CODE as -1, removing a FIXMETim Chevalier-3/+1
2012-01-17libstd: Move std tests into libstdBrian Anderson-0/+27
2011-12-22std::unicode: add functions, unit testLenny222-0/+43
2011-12-16std: declared fns as pure where sensibleStefan Plantikow-3/+3
2011-12-06Establish 'core' library separate from 'std'.Graydon Hoare-0/+166