about summary refs log tree commit diff
path: root/src/libstd/collections
AgeCommit message (Collapse)AuthorLines
2019-07-16Test that maplike FromIter satisfies uniquenessNick Hynes-2/+6
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-17Auto merge of #60899 - cuviper:RawEntryMut-origin-story, r=Centrilbors-2/+4
doc: correct the origin of RawEntryMut
2019-05-16doc: correct the origin of RawEntryMutJosh Stone-2/+4
2019-05-16Comment why get_or_insert returns &TJosh Stone-0/+4
2019-05-16Add a hash_set_entry tracking issueJosh Stone-2/+2
2019-05-16Add entry-like methods to HashSetJosh Stone-0/+52
* `HashSet::get_or_insert` * `HashSet::get_or_insert_with` These provide a simplification of the `Entry` API for `HashSet`, with names chosen to match the similar methods on `Option`.
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-2278/+405
2019-04-24Mark HashSet functions with #[inline]Amanieu d'Antras-0/+45
2019-04-24Add try_reserve to HashSetAmanieu d'Antras-0/+24
2019-04-24Remove the Recover trait for HashSetAmanieu d'Antras-52/+9
2019-04-15Remove collection-specific `with_capacity` doc from `std::collections`Marc-4/+3
Fixes #59931
2019-04-03improve worst-case performance of HashSet.is_subsetStein Somers-1/+5
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-44/+44
2019-03-16Rollup merge of #59082 - alexreg:cosmetic-2-doc-comments, r=Centrilkennytm-2/+2
A few improvements to comments in user-facing crates Not too many this time, and all concern comments (almost all doc comments) in user-facing crates (libstd, libcore, liballoc). r? @steveklabnik
2019-03-11Improvements to comments in libstd, libcore, liballoc.Alexander Regueiro-2/+2
2019-03-09Use lifetime contravariance to elide more lifetimes in core+alloc+stdScott McMurray-4/+4
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-31/+28
2019-02-25Rollup merge of #58370 - nox:relax-bounds, r=dtolnayMazdak Farrokhzad-354/+343
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-73/+73
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-73/+73
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-354/+343
Notably, hash iterators don't require any trait bounds to be iterated.
2019-02-10libs: doc commentsAlexander Regueiro-17/+17
2019-01-09Fix poor worst case performance of is_disjointStein Somers-2/+5
2019-01-09Merge remote-tracking branch 'upstream/master'Stein Somers-62/+8
2019-01-03Fix repeated word typosWiktor Kuchta-1/+1
Found with `git grep -P '\b([a-z]+)\s+\1\b'`
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-60/+0
2018-12-23Rollup merge of #57050 - RyanMarcus:master, r=zackmdaviskennytm-1/+1
Fixed typo in HashMap documentation Previously "with a custom type as key", now "with a custom key type"
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-21Fix poor worst case performance of set intersection (and union, somewhat) on ↵Stein Somers-6/+56
asymmetrically sized sets and extend unit tests slightly beyond that
2018-12-21Inline tweaksJohn Kåre Alsaker-0/+3
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-6/+6
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-2/+2
2018-11-30Inline thingsJohn Kåre Alsaker-0/+11
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).