about summary refs log tree commit diff
path: root/src/libstd/collections
AgeCommit message (Collapse)AuthorLines
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).
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-16Auto merge of #53804 - RalfJung:ptr-invalid, r=nagisabors-1/+3
fix some uses of pointer intrinsics with invalid pointers [Found by miri](https://github.com/solson/miri/pull/446): * `Vec::into_iter` calls `ptr::read` (and the underlying `copy_nonoverlapping`) with an unaligned pointer to a ZST. [According to LLVM devs](https://bugs.llvm.org/show_bug.cgi?id=38583), this is UB because it contradicts the metadata we are attaching to that pointer. * `HashMap` creation calls `ptr:.write_bytes` on a NULL pointer with a count of 0. This is likely not currently UB *currently*, but it violates the rules we are setting in https://github.com/rust-lang/rust/pull/53783, and we might want to exploit those rules later (e.g. with more `nonnull` attributes for LLVM). Probably what `HashMap` really should do is use `NonNull::dangling()` instead of 0 for the empty case, but that would require a more careful analysis of the code. It seems like ideally, we should do a review of usage of such intrinsics all over libstd to ensure that they use valid pointers even when the size is 0. Is it worth opening an issue for that?
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