rust/src/liballoc
bors 16e356ebdf Auto merge of #60396 - cuviper:ordered-retain, r=scottmcm
Document the order of {Vec,VecDeque,String}::retain

It's natural for `retain` to work in order from beginning to end, but
this wasn't actually documented to be the case. If we actually promise
this, then the caller can do useful things like track the index of each
element being tested, as [discussed in the forum][1]. This is now
documented for `Vec`, `VecDeque`, and `String`.

[1]: https://users.rust-lang.org/t/vec-retain-by-index/27697

`HashMap` and `HashSet` also have `retain`, and the `hashbrown`
implementation does happen to use a plain `iter()` order too, but it's
not certain that this should always be the case for these types.

r? @scottmcm
2019-05-12 06:24:10 +00:00
..
benches improve worst-case performance of BTreeSet difference and intersection 2019-03-29 12:18:20 +01:00
collections Auto merge of #60396 - cuviper:ordered-retain, r=scottmcm 2019-05-12 06:24:10 +00:00
prelude Stabilize the alloc crate. 2019-04-12 20:07:30 +02:00
tests Deny rust_2018_idioms in liballoc tests 2019-04-20 16:05:25 +02:00
alloc.rs make liballoc internal test suite mostly pass in Miri 2019-04-18 13:37:14 +02:00
borrow.rs warn(missing_docs) in liballoc, and add missing docs 2019-04-15 16:35:50 +02:00
boxed.rs Stabilize futures_api 2019-04-23 16:13:53 -07:00
boxed_test.rs liballoc: revert nested imports style changes. 2019-02-03 08:27:44 +01:00
Cargo.toml Update cmake, cc and compiler_builtins for VS 2019 support 2019-04-10 21:17:31 +02:00
fmt.rs Make clear that format padding doesn't work for Debug 2019-04-13 15:39:49 +10:00
lib.rs Remove unused feature(need_allocator). 2019-05-04 04:20:55 +02:00
macros.rs Bootstrap compiler update for 1.35 release 2019-03-02 09:05:34 -07:00
raw_vec.rs Stabilize the alloc crate. 2019-04-12 20:07:30 +02:00
rc.rs add comment to Rc/Arc's Eq specialization 2019-05-11 11:03:28 +02:00
slice.rs warn(missing_docs) in liballoc, and add missing docs 2019-04-15 16:35:50 +02:00
str.rs Implement BorrowMut<str> for String 2019-04-30 17:50:38 +09:00
string.rs Add examples of ordered retain 2019-05-10 18:01:50 -07:00
sync.rs add comment to Rc/Arc's Eq specialization 2019-05-11 11:03:28 +02:00
vec.rs Add examples of ordered retain 2019-05-10 18:01:50 -07:00