about summary refs log tree commit diff
path: root/src/libcore/cmp.rs
AgeCommit message (Collapse)AuthorLines
2013-05-06Move FuzzyEq trait into core::cmp and rename it to 'ApproxEq'Brendan Zabarauskas-0/+7
2013-04-25implement Ord, TotalEq and TotalOrd for charDaniel Micay-0/+4
Closes #6063
2013-04-12auto merge of #5827 : ↵bors-0/+21
nikomatsakis/rust/issue-5656-change-meaning-of-borrowed-self, r=pcwalton See #5656 for details. r? @pcwalton
2013-04-12libcore: combine cmp::Ordering instances in lexical order.Huon Wilson-0/+27
2013-04-10Reason about nested free variables that appear in a functionNiko Matsakis-0/+21
signature. In a nutshell, the idea is to (1) report an error if, for a region pointer `'a T`, the lifetime `'a` is longer than any lifetimes that appear in `T` (in other words, if a borrowed pointer outlives any portion of its contents) and then (2) use this to assume that in a function like `fn(self: &'a &'b T)`, the relationship `'a <= 'b` holds. This is needed for #5656. Fixes #5728.
2013-04-07cmp: add Ord+TotalOrd impls for Ordering itselfDaniel Micay-1/+25
2013-04-07cmp: derive Clone for OrderingDaniel Micay-1/+1
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-2/+2
2013-03-27add a TotalEq traitDaniel Micay-11/+44
2013-03-27cmp: rm TotalOrd impl code duplicationDaniel Micay-53/+22
2013-03-22libcore: Remove `pure` from libcore. rs=depurePatrick Walton-27/+27
2013-03-22core: replace uses of old deriving attribute with new oneAndrew Paseltiner-1/+1
2013-03-20change some uses of fail_unless to assert_eqJohn Clements-5/+5
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-5/+5
2013-03-05libcore: Implement an `Equiv` trait and use it on hashmaps.Patrick Walton-0/+8
7.3x speedup in string map search speed on a microbenchmark of pure hashmap searching against a constant string, due to the lack of allocations. I ran into a few snags. 1. The way the coherence check is set up, I can't implement `Equiv<@str>` and `Equiv<~str>` for `&str` simultaneously. 2. I wanted to implement `Equiv<T>` for all `T:Eq` (i.e. every type can be compared to itself if it implements `Eq`), but the coherence check didn't like that either. 3. I couldn't add this to the `Map` trait because `LinearMap` needs special handling for its `Q` type parameter: it must not only implement `Equiv<T>` but also `Hash` and `Eq`. 4. `find_equiv(&&"foo")` doesn't parse, because of the double ampersand. It has to be written `find_equiv(& &"foo")`. We can probably just fix this. Nevertheless, this is a huge win; it should address a major source of performance problems, including the one here: http://maniagnosis.crsr.net/2013/02/creating-letterpress-cheating-program.html
2013-03-02inline the implementation of TotalOrd for integersDaniel Micay-0/+1
2013-03-02add a TotalOrd traitDaniel Micay-0/+76
2013-02-20librustc: Separate most trait bounds with '+'. rs=plussingPatrick Walton-8/+8
2013-02-13core: add min and max to cmp, re-export various places.Graydon Hoare-0/+9
2013-02-07Make ~fn non-copyable, make &fn copyable, split barefn/closure types,Niko Matsakis-4/+0
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
2013-01-30librustc: Change `self` as a type to `Self` everywhere. r=brsonPatrick Walton-6/+6
2013-01-13core: Align cmp::le() with the other implementationsPeter Williams-4/+10
Also add comments reminding that IEEE 754 requires unusual semantics for comparison operators as applied to NaNs (x != x, if x = NaN), in case someone in the future wants to get clever.
2013-01-14Inlining methods/functions in core.gifnksm-0/+6
Also inlining some functions which take functions as arguments.
2012-12-03Update license, add license boilerplate to most files. Remainder will follow.Graydon Hoare-0/+10
2012-11-30core: Make core.rc more readable. CleanupBrian Anderson-60/+25
2012-11-28Register snapshotsBrian Anderson-38/+0
2012-11-19rustc: Implement explicit self for Eq and Ord. r=graydonPatrick Walton-0/+39
2012-09-28De-export ops, cmp, num. Part of #3583.Graydon Hoare-2/+0
2012-09-26libcore: De-export box, cast, and dlistPatrick Walton-15/+14
2012-09-23Register snapshots. Remove redundant Eq impls, Makefile hacksBrian Anderson-79/+0
2012-09-21Install new pub/priv/export rules as defaults, old rules accessible under ↵Graydon Hoare-2/+6
#[legacy_exports];
2012-09-20rustc: De-mode all overloaded operatorsPatrick Walton-38/+130
2012-09-19core: Clean up crate docs and give all mods a brief descriptionBrian Anderson-2/+14
2012-09-12Document IterBytes, Eq, Cmp, Hash. Close #3449.Graydon Hoare-0/+16
2012-09-07rustc: Add an "ne" method to the Eq trait, and implement it everywherePatrick Walton-0/+6
2012-08-29rustc: Make `<=`, `>=`, and `>` use traits as wellPatrick Walton-0/+15
2012-08-29rustc: Make `<` and `=` into traitsPatrick Walton-3/+3
2012-08-27libcore: Fix build harderPatrick Walton-3/+11
2012-08-27libcore: Fix core testPatrick Walton-0/+3
2012-08-27libcore: Implement ord and eq language itemsPatrick Walton-0/+4
2012-08-13core: Camel case some lesser-used modulesBrian Anderson-5/+5
2012-08-13De-mode-ify a few minor libcore modules.Graydon Hoare-0/+4
2012-08-02Remove modes from map API and replace with regions.Niko Matsakis-0/+11
API is (for now) mostly by value, there are options to use it by reference if you like. Hash and equality functions must be pure and by reference (forward looking to the day when something like send_map becomes the standard map).
2012-07-26core: Mark a bunch of numeric functions as purePatrick Walton-4/+4
2012-07-04convert doc-attributes to doc-comments using ↵Gareth Daniel Smith-1/+1
./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
2012-06-06Revert "Revert "Merge pull request #2516 from mozilla/incoming" due to failures"Tim Chevalier-0/+10
This reverts commit 9fae95860de510f6874810cf43efb83f101246ef.