about summary refs log tree commit diff
path: root/src/libstd/collections/hash/map.rs
AgeCommit message (Collapse)AuthorLines
2019-08-16Add the Layout of the failed allocation to TryReserveError::AllocErrorSimon Sapin-2/+5
… and add a separately-unstable field to force non-exhaustive matching (`#[non_exhaustive]` is no implemented yet on enum variants) so that we have the option to later expose the allocator’s error value. CC https://github.com/rust-lang/wg-allocators/issues/23
2019-08-16Update hashbrown to 0.5.0Simon Sapin-1/+1
2019-08-16Rename CollectionAllocError to TryReserveErrorSimon Sapin-6/+6
2019-07-16Test that maplike FromIter satisfies uniquenessNick Hynes-1/+3
2019-07-02HashMap is UnwindSafeSimon Sapin-0/+6
Fixes https://github.com/rust-lang/rust/issues/62301, a regression in 1.36.0 which was caused by hashbrown using `NonZero<T>` where the older hashmap used `Unique<T>`.
2019-05-20Rollup merge of #60511 - taiki-e:libstd-intra-doc, r=Dylan-DPCMazdak Farrokhzad-1/+4
Fix intra-doc link resolution failure on re-exporting libstd Currently, re-exporting libstd items as below will [occur a lot of failures](https://gist.github.com/taiki-e/e33e0e8631ef47f65a74a3b69f456366). ```rust pub use std::*; ``` Until the underlying issue (#56922) fixed, we can fix that so they don't propagate to downstream crates. Related: https://github.com/rust-lang/rust/pull/56941 (That PR fixed failures that occur when re-exporting from libcore to libstd.) r? @QuietMisdreavus
2019-05-16doc: correct the origin of RawEntryMutJosh Stone-2/+4
2019-05-04Fix intra-doc link resolution failure on re-exporting libstdTaiki Endo-1/+4
2019-04-25ignore-tidy-filelength on all files with greater than 3000 linesvarkor-0/+2
2019-04-24Remove broken testsAmanieu d'Antras-74/+0
2019-04-24Replace the robin-hood hash table with hashbrownAmanieu d'Antras-1144/+405
2019-04-24Remove the Recover trait for HashSetAmanieu d'Antras-40/+0
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-27/+27
2019-03-11Improvements to comments in libstd, libcore, liballoc.Alexander Regueiro-1/+1
2019-03-08Rollup merge of #58369 - nox:sync-hash-map-entry, r=AmanieuPietro Albini-0/+10
Make the Entry API of HashMap<K, V> Sync and Send Fixes #45219
2019-03-04Make the Entry API of HashMap<K, V> Sync and Send (fixes #45219)Anthony Ramine-0/+10
2019-02-28libstd => 2018Taiki Endo-12/+12
2019-02-25Rollup merge of #58370 - nox:relax-bounds, r=dtolnayMazdak Farrokhzad-236/+229
Relax some Hash bounds on HashMap<K, V, S> and HashSet<T, S> Notably, hash iterators don't require any trait bounds to be iterated.
2019-02-20Rollup merge of #58553 - scottmcm:more-ihle, r=Centrilkennytm-33/+33
Use more impl header lifetime elision Inspired by seeing explicit lifetimes on these two: - https://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#impl-FusedIterator - https://doc.rust-lang.org/nightly/std/primitive.u32.html#impl-Not And a follow-up to https://github.com/rust-lang/rust/pull/54687, that started using IHLE in libcore. Most of the changes in here fall into two big categories: - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop`, `Debug`, and `Clone`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations [where the flipped one cannot elide the lifetime](https://internals.rust-lang.org/t/impl-type-parameter-aliases/9403/2?u=scottmcm). I also removed two lifetimes that turned out to be completely unused; see https://github.com/rust-lang/rust/issues/41960#issuecomment-464557423
2019-02-17Use more impl header lifetime elisionScott McMurray-33/+33
There are two big categories of changes in here - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop` & `Debug`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations where the flipped one cannot elide the lifetime.
2019-02-13Relax some Hash bounds on HashMap<K, V, S> and HashSet<T, S>Anthony Ramine-236/+229
Notably, hash iterators don't require any trait bounds to be iterated.
2019-02-10libs: doc commentsAlexander Regueiro-7/+7
2018-12-28Auto merge of #55519 - fhartwig:hashmap-index-example, r=Centrilbors-0/+3
Add example of using the indexing operator to HashMap docs Fixes #52575
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-21Fixed typo in HashMap documentationRyan Marcus-1/+1
Previously "with a custom type as key", now "with a custom key type"
2018-12-07Rollup merge of #56561 - Zoxc:too-raw, r=Gankrokennytm-0/+4
Fix bug in from_key_hashed_nocheck
2018-12-06Fix bug in from_key_hashed_nocheckJohn Kåre Alsaker-0/+4
2018-12-04Replace usages of `..i + 1` ranges with `..=i`.Corey Farwell-2/+2
2018-12-02Update issue number of `shrink_to` methods to point the tracking issueHidehito Yabuuchi-1/+1
2018-11-30Inline thingsJohn Kåre Alsaker-0/+7
2018-11-22Fix the tracking issue for hash_raw_entrySteven Fackler-38/+38
It used to point to the implementation PR.
2018-11-22Rollup merge of #55784 - meltinglava:master, r=KodrAusGuillaume Gomez-8/+8
Clarifying documentation for collections::hash_map::Entry::or_insert Previous version does not show that or_insert does not insert the passed value, as the passed value was the same value as what was already in the map.
2018-11-13fix various typos in doc commentsAndy Russell-1/+1
2018-11-13The example values are now easyer to differenciateMeltinglava-8/+8
2018-11-08Clarifying documentation for collections::hash_map::Entry::or_insertMeltinglava-2/+2
Previous version does not show that or_insert does not insert the passed value, as the passed value was the same value as what was already in the map.
2018-11-07Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwcokennytm-1/+1
refactor: use shorthand fields refactor: use shorthand for single fields everywhere (excluding tests).
2018-11-06refactor: use shorthand fieldsteresy-1/+1
2018-11-02Auto merge of #54043 - fintelia:raw_entry, r=alexcrichtonbors-6/+672
Add raw_entry API to HashMap This is a continuation of #50821.
2018-10-31A couple suggested editsJonathan Behrens-7/+3
2018-10-30Add example of using the indexing operator to HashMap docsFlorian Hartwig-0/+3
2018-09-13Entry is an enum not a structJonathan Behrens-1/+1
2018-09-13Fix links in docsJonathan Behrens-2/+7
2018-09-13Eliminate unused variable warningJonathan Behrens-1/+1
2018-09-13Fix tests and update issue numberJonathan Behrens-138/+156
2018-09-13Remove println!() statement from HashMap unit testJonathan Behrens-1/+0
2018-09-12Fix formattingJonathan Behrens-1/+2
2018-09-10fix typos in growth algo descriptionVal-4/+4
modified to read "the first table overflows into the second, and the second into the first." plus smaller typos
2018-09-07Cleanup API somewhatJonathan Behrens-217/+195
2018-09-06Fix invalid urlsGuillaume Gomez-3/+2
2018-09-05disambiguate hashesAlexis Beingessner-3/+3