summary refs log tree commit diff
path: root/src/libcore/hashmap.rs
AgeCommit message (Collapse)AuthorLines
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-143/+143
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-143/+143
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-2/+2
2013-03-29core: add LinearMap::with_capacityErick Tryzelaar-3/+17
2013-03-28Removing unused importsAlex Crichton-2/+2
2013-03-27hashmap: improve docstringDaniel Micay-1/+4
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-4/+3
2013-03-26syntax: Removing uses of HashMapAlex Crichton-0/+5
2013-03-24expose find_mut in the Map traitDaniel Micay-11/+11
2013-03-24hashmap: add find_mut methodDaniel Micay-1/+34
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-1/+1
2013-03-22libcore: Remove `pure` from libcore. rs=depurePatrick Walton-58/+49
2013-03-22librustc: Remove all uses of `static` from functions. rs=destaticPatrick Walton-2/+2
2013-03-18librustc: Make the compiler ignore purity.Patrick Walton-4/+4
For bootstrapping purposes, this commit does not remove all uses of the keyword "pure" -- doing so would cause the compiler to no longer bootstrap due to some syntax extensions ("deriving" in particular). Instead, it makes the compiler ignore "pure". Post-snapshot, we can remove "pure" from the language. There are quite a few (~100) borrow check errors that were essentially all the result of mutable fields or partial borrows of `@mut`. Per discussions with Niko I think we want to allow partial borrows of `@mut` but detect obvious footguns. We should also improve the error message when `@mut` is erroneously reborrowed.
2013-03-18librustc: Convert all uses of old lifetime notation to new lifetime ↵Patrick Walton-8/+8
notation. rs=delifetiming
2013-03-14auto merge of #5365 : thestinger/rust/map, r=catamorphismbors-0/+13
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-0/+1
2013-03-13add the mutate_values method to the Map traitDaniel Micay-0/+13
2013-03-11libsyntax: Stop parsing bare functions in preparation for switching them overPatrick Walton-1/+3
2013-03-11librustc: Replace all uses of `fn()` with `&fn()`. rs=defunPatrick Walton-12/+12
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-140/+140
2013-03-06Add manual &self/ and &static/ and /&self declarations thatNiko Matsakis-1/+3
are currently inferred. New rules are coming that will require them to be explicit. All add some explicit self declarations.
2013-03-05libcore: Implement an `Equiv` trait and use it on hashmaps.Patrick Walton-1/+50
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-04Remove unused imports throughout src/Alex Crichton-3/+0
2013-03-02make LinearMap fields privateDaniel Micay-313/+313
Closes #4764
2013-02-28Fix implicit leaks of imports throughout librariesAlex Crichton-7/+6
Also touch up use of 'pub' and move some tests around so the tested functions don't have to be 'pub'
2013-02-20librustc: Separate most trait bounds with '+'. rs=plussingPatrick Walton-15/+15
2013-02-15add reserve_at_least method to LinearMap/LinearSetDaniel Micay-4/+25
2013-02-15rm FIXME from LinearMap's to_bucketDaniel Micay-4/+2
There are no more poor hash functions left in the codebase, and it makes sense to rely on there being a good hash function thanks to the inclusion of SipHash and the ease of using it with custom types. Closes #3041
2013-02-14auto merge of #4934 : nickdesaulniers/rust/issue4524cleanup, r=brsonbors-3/+3
review? @brson Issue #4524
2013-02-14librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵Patrick Walton-10/+10
rs=implflipping
2013-02-14Remove all final references to die!Nick Desaulniers-3/+3
2013-02-13Remove die!, raplace invocations with fail! Issue #4524 pt 3Nick Desaulniers-3/+3
2013-02-12Adjust borrow checker algorithm to address #4856 unsoundness,Niko Matsakis-2/+6
and then adjust code to match. rs=unsound (will review post-landing)
2013-02-10core: add LinearMap::find_or_insert{,_with}Erick Tryzelaar-13/+81
This allows for inserting a new value into the map only if it doesn't already exist in the map.
2013-02-10core: rename hashmap test functionsErick Tryzelaar-10/+10
2013-02-10libcore: LinearMap doesn't need to pass around the bucket vecErick Tryzelaar-10/+7
2013-02-07implement BaseIter for LinearMapDaniel Micay-17/+21
2013-02-07rm each method from the Map traitDaniel Micay-13/+13
the map types should implement BaseIter instead
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-02-06remove issue #3148 workarounds (no longer needed)Daniel Micay-5/+2
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-1/+1
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-3/+3
2013-01-30Use task local random when initializing mapsAlex Crichton-1/+1
2013-01-29core tests: Add use vec; directive inside core::hashmap testsTim Chevalier-0/+1
This is probably to work around a bug.
2013-01-29add intersection and union to the Set traitDaniel Micay-1/+83
2013-01-29add difference and symmetric_difference to SetDaniel Micay-0/+65
2013-01-29add is_disjoint to the Set traitDaniel Micay-3/+30
2013-01-29add is_subset and is_superset to the Set traitDaniel Micay-1/+46
2013-01-29Long lineTim Chevalier-2/+2