about summary refs log tree commit diff
path: root/src/liballoc/tests/lib.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-57/+0
2020-06-20Remove uses of `Vec::remove_item`Lukas Kalbertodt-1/+0
2020-05-19Auto merge of #71447 - cuviper:unsized_cow, r=dtolnaybors-0/+1
impl From<Cow> for Box, Rc, and Arc These forward `Borrowed`/`Owned` values to existing `From` impls. - `Box<T>` is a fundamental type, so it would be a breaking change to add a blanket impl. Therefore, `From<Cow>` is only implemented for `[T]`, `str`, `CStr`, `OsStr`, and `Path`. - For `Rc<T>` and `Arc<T>`, `From<Cow>` is implemented for everything that implements `From` the borrowed and owned types separately.
2020-04-24Add BinaryHeap::retain as suggested in #42849arlo-0/+1
2020-04-22Add tests from CowJosh Stone-0/+1
2020-03-29BTreeMap/BTreeSet: implement and test drain_filterStein Somers-0/+1
2020-02-09Implement split_inclusive for slice and str, an splitting iterator that ↵Pyry Kontio-0/+1
includes the matched part in the iterated substrings as a terminator.
2020-01-11Revert "Rollup merge of #67727 - Dylan-DPC:stabilise/remove_item, ↵Lzu Tao-0/+1
r=alexcrichton" This reverts commit 4ed415b5478c74094c2859abfddb959588cd6bb1, reversing changes made to 3cce950743e8aa74a4378dfdefbbc80223a00865.
2020-01-06oh the one that was left behinddylan_DPC-1/+0
2020-01-05add feature gatedylan_DPC-0/+1
2019-12-22Format the worldMark Rousskov-2/+2
2019-11-13Auto merge of #65637 - ssomers:master, r=scottmcmbors-0/+1
proposal for BTreeMap/Set min/max, #62924 - Which pair of names: #62924 lists the existing possibilities min/max, first/last, (EDIT) front/back, peek(/peek_back?). Iterators have next/next_back or next/last. I'm slightly in favour of first/last because min/max might suggest they search over the entire map, and front/back pretends they are only about position. - Return key only instead of pair like iterator does? - If not, then keep the _key_value suffix? ~~Also provide variant with mutable value? But there is no such variant for get_key_value.~~ - Look for and upgrade more usages of `.iter().next()` and such in the libraries? I only upgraded the ones I contributed myself, all very recently.
2019-10-31Auto merge of #65091 - sekineh:into-iter-sorted, r=KodrAusbors-0/+2
Implement ordered/sorted iterators on BinaryHeap as per #59278 I've implemented the ordered version of iterator on BinaryHeap as per #59278. # Added methods: * `.into_iter_sorted()` * like `.into_iter()`; but returns elements in heap order * `.drain_sorted()` * like `.drain()`; but returns elements in heap order * It's a bit _lazy_; elements are removed on drop. (Edit: it’s similar to vec::Drain) For `DrainSorted` struct, I implemented `Drop` trait following @scottmcm 's [suggestion](https://github.com/rust-lang/rust/issues/59278#issuecomment-537306925) # ~TODO~ DONE * ~I think I need to add more tests other than doctest.~ # **Notes:** * we renamed `_ordered` to `_sorted`, because the latter is more common in rust libs. (as suggested by @KodrAus )
2019-10-25Add .into_iter_sorted() and .drain_sorted()Hideki Sekine-0/+2
* `.drain_sorted()` doc change suggested by @KodrAus
2019-10-23proposal for access to BTreeMap/BTreeSet first/last, #62924Stein Somers-0/+1
2019-10-19Stabilize `Option::flatten`Ethan Brierley-1/+0
2019-10-19Rollup merge of #65174 - SimonSapin:zero-box, r=alexcrichtonMazdak Farrokhzad-0/+2
Fix zero-size uninitialized boxes Requesting a zero-size allocation is not allowed, return a dangling pointer instead. CC https://github.com/rust-lang/rust/issues/63291#issuecomment-538692745
2019-10-18Uninitialized boxes: add test for zero-size allocationsSimon Sapin-0/+2
2019-10-02Stabilize `slice::repeat` (feature `repeat_generic_slice`)Lzu Tao-1/+0
2019-08-09Add missing #![feature(associated_type_bounds)]Ilija Tovilo-0/+1
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-06-21shared_from_iter: Add more tests.Mazdak Farrokhzad-0/+2
2019-05-09make vecdeque_rotate stableDodo-1/+0
2019-04-20Deny rust_2018_idioms in liballoc testsPhilipp Hansch-0/+1
2019-02-25Remove some unnecessary 'extern crate'Taiki Endo-3/+0
2019-02-12Stabilize slice_sort_by_cached_keyScott McMurray-1/+0
2019-02-12Stabilize str::escape_* methodsSimon Sapin-1/+0
FCP: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-19Add more VecDeque::rotate_{left|right} testsScott McMurray-1/+2
2018-11-11std: Delete the `alloc_system` crateAlex Crichton-2/+0
This commit deletes the `alloc_system` crate from the standard distribution. This unstable crate is no longer needed in the modern stable global allocator world, but rather its functionality is folded directly into the standard library. The standard library was already the only stable location to access this crate, and as a result this should not affect any stable code.
2018-10-31Bump nightly to 1.32.0Alex Crichton-1/+0
* Also update the bootstrap compiler * Update cargo to 1.32.0 * Clean out stage0 annotations
2018-10-18Stabilize slice::rchunks(), rchunks_mut(), rchunks_exact(), rchunk_exact_mut()Sebastian Dröge-1/+0
Fixes #55177
2018-10-18Stabilize slice::chunks_exact() and slice::chunks_exact_mut()Sebastian Dröge-1/+0
Fixes #47115
2018-10-18Add slice::rchunks(), rchunks_mut(), rchunks_exact() and rchunks_exact_mut()Sebastian Dröge-0/+1
These work exactly like the normal chunks iterators but start creating chunks from the end of the slice. See #55177 for the tracking issue
2018-10-05Stabilize `min_const_fn`Oliver Schneider-1/+1
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-2/+1
2018-09-24Rename slice::exact_chunks() to slice::chunks_exact()Sebastian Dröge-1/+1
See https://github.com/rust-lang/rust/issues/47115#issuecomment-403090815 and https://github.com/rust-lang/rust/issues/47115#issuecomment-424053547
2018-08-31Restrict most uses of `const_fn` to `min_const_fn`Oliver Schneider-1/+2
2018-08-23Stabilize 'attr_literals' feature.Sergio Benitez-1/+0
2018-08-05Fix stage 2 testsvarkor-2/+0
2018-08-05Remove unnecessary or invalid feature attributesvarkor-1/+0
2018-07-28Rollup merge of #52769 - sinkuu:stray_test, r=alexcrichtonkennytm-0/+1
Incorporate a stray test `liballoc/repeat-generic-slice.rs` doesn't seem to be tested (I think it was intended to be placed in `run-pass`). This PR incorporates the test into `liballoc/tests`.
2018-07-27Incorporate a stray testShotaro Yamada-0/+1
2018-07-25Add missing dynTatsuyuki Ishi-1/+1
2018-07-07Add some unit tests for dangling Weak referencesSimon Sapin-0/+2
2018-06-02Stabilize Iterator::step_byThayne McCombs-1/+0
Fixes #27741
2018-05-17Stabilise inclusive_range_methodsvarkor-1/+0
2018-04-30Make the fields of RangeInclusive private.kennytm-1/+1
Added new()/start()/end() methods to RangeInclusive. Changed the lowering of `..=` to use RangeInclusive::new().
2018-04-12Mark the rest of the `unicode` feature flag as perma-unstable.Simon Sapin-1/+0
2018-04-12Deprecate the std_unicode crateSimon Sapin-1/+1