summary refs log tree commit diff
path: root/src/libcollections
AgeCommit message (Collapse)AuthorLines
2016-02-29std: Stabilize APIs for the 1.8 releaseAlex Crichton-4/+16
This commit is the result of the FCPs ending for the 1.8 release cycle for both the libs and the lang suteams. The full list of changes are: Stabilized * `braced_empty_structs` * `augmented_assignments` * `str::encode_utf16` - renamed from `utf16_units` * `str::EncodeUtf16` - renamed from `Utf16Units` * `Ref::map` * `RefMut::map` * `ptr::drop_in_place` * `time::Instant` * `time::SystemTime` * `{Instant,SystemTime}::now` * `{Instant,SystemTime}::duration_since` - renamed from `duration_from_earlier` * `{Instant,SystemTime}::elapsed` * Various `Add`/`Sub` impls for `Time` and `SystemTime` * `SystemTimeError` * `SystemTimeError::duration` * Various impls for `SystemTimeError` * `UNIX_EPOCH` * `ops::{Add,Sub,Mul,Div,Rem,BitAnd,BitOr,BitXor,Shl,Shr}Assign` Deprecated * Scoped TLS (the `scoped_thread_local!` macro) * `Ref::filter_map` * `RefMut::filter_map` * `RwLockReadGuard::map` * `RwLockWriteGuard::map` * `Condvar::wait_timeout_with` Closes #27714 Closes #27715 Closes #27746 Closes #27748 Closes #27908 Closes #29866
2016-02-27Improve formatting of the primitive str documentationMichael Huynh-17/+35
Adds extra documentation links for library types and methods to be consistent with similar items already linked. Also includes minor formatting fixes.
2016-02-26Auto merge of #31834 - ubsan:copy_from_slice, r=alexcrichtonbors-0/+25
implements rust-lang/rfcs#1419 r? alexcrichton
2016-02-25Add unstable copy_from_sliceNicholas Mazzuca-0/+25
2016-02-25Rollup merge of #31850 - GuillaumeGomez:vec-doc, r=steveklabnikManish Goregaokar-0/+43
r? @steveklabnik cc @mbrubeck
2016-02-25Rollup merge of #31784 - urschrei:chunks_doc, r=steveklabnikManish Goregaokar-2/+2
Closes #31773 r? @steveklabnik
2016-02-24Add more explanation on vec typeGuillaume Gomez-0/+43
2016-02-24Auto merge of #31778 - aturon:snapshot, r=alexcrichtonbors-4/+4
r? @alexcrichton
2016-02-23Register new snapshotsAaron Turon-4/+4
2016-02-22Auto merge of #31704 - tbu-:pr_vec_into_iter_clone, r=aturonbors-1/+11
2016-02-20Correct size of returned iteratorStephan Hügel-4/+4
The methods don't return `size` slices, but rather slices of `size` elements. Sorry!
2016-02-20Clarify chunks() and chunks_mut() iterator contentStephan Hügel-2/+2
Closes #31773
2016-02-17Rollup merge of #31694 - oconnor663:insertdocs, r=steveklabnikSteve Klabnik-3/+4
The first time I read the docs for `insert()`, I thought it was saying it didn't update existing *values*, and I was confused. Reword the docs to make it clear that `insert()` does update values.
2016-02-17Implement `Clone` for `std::vec::IntoIter`Tobias Bucher-1/+11
2016-02-17Auto merge of #31696 - apasel422:placement, r=pnkfelixbors-2/+150
CC #30172. r? @pnkfelix CC @nagisa
2016-02-16Implement placement-in protocol for `LinkedList`Andrew Paseltiner-2/+150
CC #30172.
2016-02-15clarify how insert() doesn't update keysJack O'Connor-3/+4
The first time I read the docs for `insert()`, I thought it was saying it didn't update existing *values*, and I was confused. Reword the docs to make it clear that `insert()` does update values.
2016-02-16Clarify contiguous memory array structure of vectors in documentationDirk Gadsden-3/+3
Closes #31554. Contributes to #29380.
2016-02-14Rollup merge of #31585 - tshepang:over-explanation, r=brsonManish Goregaokar-2/+2
…o read
2016-02-12doc: skipping (obvious) details here is worth making this more nice to readTshepang Lekhonkhobe-2/+2
2016-02-11bootstrap: Add a bunch of Cargo.toml filesAlex Crichton-0/+14
These describe the structure of all our crate dependencies.
2016-02-10Auto merge of #31420 - bluss:deque-equality, r=Gankrobors-1/+33
collections: Use slice parts in PartialEq for VecDeque This improves == for VecDeque by using the slice representation. This will also improve further if codegen for slice comparison improves. Benchmark run of 1000 u64 elements, comparing for equality (all equal). Cpu time to compare the vecdeques is reduced to less than 50% of what it was before. ``` test test_eq_u64 ... bench: 1,885 ns/iter (+/- 163) = 4244 MB/s test test_eq_new_u64 ... bench: 802 ns/iter (+/- 100) = 9975 MB/s ```
2016-02-09Rollup merge of #31515 - steveklabnik:doc_drain, r=alexcrichtonSteve Klabnik-0/+6
This is the last bit of String docs needed to Close #29376
2016-02-09Improve docs for Drain on StringSteve Klabnik-0/+6
This is the last bit of String docs needed to Close #29376
2016-02-09Minor spelling fixesCarlos E. Garcia-3/+3
2016-02-09Auto merge of #31492 - alexcrichton:remove-allow-trivial-casts, r=nrcbors-1/+0
These were added a long time ago but we long since switched the lint back to allow-by-default, so these annotations shouldn't be necessary.
2016-02-08Fix up docs for String::from_utf8_lossy()Steve Klabnik-11/+12
When I last did a pass through the string documentation, I focused on consistency across similar functions. Unfortunately, I missed some details. This example was _too_ consistent: it wasn't actually accurate! This commit fixes the docs do both be more accurate and to explain why the return type is a Cow<'a, str>. First reported here: https://www.reddit.com/r/rust/comments/44q9ms/stringfrom_utf8_lossy_doesnt_return_a_string/
2016-02-08Remove old #[allow(trivial_casts)] annotationsAlex Crichton-1/+0
These were added a long time ago but we long since switched the lint back to allow-by-default, so these annotations shouldn't be necessary.
2016-02-05Auto merge of #31386 - tbu-:pr_cow_from_vec, r=alexcrichtonbors-0/+14
Fixes #31354.
2016-02-03Add `Cow::from` for `Vec` and slicesTobias Bucher-0/+14
Fixes #31354.
2016-02-02Correct `linked_list::IntoIter` doc commentAndrew Paseltiner-1/+1
2016-02-02Rollup merge of #31345 - kamalmarhubi:book-docs-special-section-errors, ↵Steve Klabnik-2/+2
r=steveklabnik This matches the usage in the standard library's documentation.
2016-02-02Rollup merge of #31202 - steveklabnik:gh30459, r=alexcrichtonSteve Klabnik-0/+48
Fixes #30459 Fun fact: i wanted to write "Arabic" and "Hebrew" in Arabic and Hebrew, but vim kept doing the copy/paste in the wrong direction.
2016-02-02Add doctests for directionalitySteve Klabnik-0/+20
Thanks @nodakai
2016-02-01docs: Standardize on 'Errors' header in std docsKamal Marhubi-2/+2
2016-01-29std::string::String.from_utf16 doc fixtgor-1/+1
2016-01-28Auto merge of #31225 - mbrubeck:btreeset-size-hint, r=Gankrobors-2/+27
None
2016-01-27Auto merge of #31224 - bluss:deque-hashing, r=Gankrobors-3/+3
Hash VecDeque in its slice parts Use .as_slices() for a more efficient code path in VecDeque's Hash impl. This still hashes the elements in the same order. Before/after timing of VecDeque hashing 1024 elements of u8 and u64 shows that the vecdeque now can match the Vec (test_hashing_vec_of_u64 is the Vec run). ``` before test test_hashing_u64 ... bench: 14,031 ns/iter (+/- 236) = 583 MB/s test test_hashing_u8 ... bench: 7,887 ns/iter (+/- 65) = 129 MB/s test test_hashing_vec_of_u64 ... bench: 6,578 ns/iter (+/- 76) = 1245 MB/s after running 5 tests test test_hashing_u64 ... bench: 6,495 ns/iter (+/- 52) = 1261 MB/s test test_hashing_u8 ... bench: 851 ns/iter (+/- 16) = 1203 MB/s test test_hashing_vec_of_u64 ... bench: 6,499 ns/iter (+/- 59) = 1260 MB/s ```
2016-01-27collections: Use slices parts in PartialEq for VecDequeUlrik Sverdrup-1/+33
This improves == for VecDeque by using the slice representation. This will also improve further if codegen for slice comparison improves. Benchmark run of 1000 u64 elements, comparing for equality (all equal). Cpu time to compare the vecdeques is reduced to less than 50% of what it was before. ``` test test_eq_u64 ... bench: 1,885 ns/iter (+/- 163) = 4244 MB/s test test_eq_new_u64 ... bench: 802 ns/iter (+/- 100) = 9975 MB/s ```
2016-01-27collections: Hash VecDeque in its slice partsUlrik Sverdrup-3/+3
Use .as_slices() for a more efficient code path in VecDeque's Hash impl. This still hashes the elements in the same order. Before/after timing of VecDeque hashing 1024 elements of u8 and u64 shows that the vecdeque now can match the Vec (test_hashing_vec_of_u64 is the Vec run). before test test_hashing_u64 ... bench: 14,031 ns/iter (+/- 236) = 583 MB/s test test_hashing_u8 ... bench: 7,887 ns/iter (+/- 65) = 129 MB/s test test_hashing_vec_of_u64 ... bench: 6,578 ns/iter (+/- 76) = 1245 MB/s after running 5 tests test test_hashing_u64 ... bench: 6,495 ns/iter (+/- 52) = 1261 MB/s test test_hashing_u8 ... bench: 851 ns/iter (+/- 16) = 1203 MB/s test test_hashing_vec_of_u64 ... bench: 6,499 ns/iter (+/- 59) = 1260 MB/s
2016-01-26Add size hints for BTreeSet iteratorsMatt Brubeck-2/+27
2016-01-26Fix warnings during testsAlex Crichton-18/+3
The deny(warnings) attribute is now enabled for tests so we need to weed out these warnings as well.
2016-01-26Document LTR vs RTL wrt trim_*Steve Klabnik-0/+28
The doc part of #30459
2016-01-24mk: Move from `-D warnings` to `#![deny(warnings)]`Alex Crichton-0/+1
This commit removes the `-D warnings` flag being passed through the makefiles to all crates to instead be a crate attribute. We want these attributes always applied for all our standard builds, and this is more amenable to Cargo-based builds as well. Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)` attribute currently to match the same semantics we have today
2016-01-23Rollup merge of #31136 - mbrubeck:btree-doc, r=steveklabnikSteve Klabnik-10/+10
Also change the examples to make this more obvious. Fixes #31129.
2016-01-22Document that BTreeMap iteration is in orderMatt Brubeck-10/+10
Also change the examples to make this more obvious. Fixes #31129.
2016-01-22Implement error::Error and fmt::Display for string::ParseErrorDirk Gadsden-0/+7
Fixes #31106.
2016-01-20Auto merge of #31038 - gereeter:btree-panic, r=Gankrobors-2/+2
…ving elements into it. Fixes #31029.
2016-01-19In BTreeMap's merge function, adjust the length of the node before moving ↵Jonathan S-2/+2
elements into it.
2016-01-19Rollup merge of #31008 - barosl:typo, r=blussManish Goregaokar-2/+2