about summary refs log tree commit diff
path: root/src/libcollections
AgeCommit message (Collapse)AuthorLines
2016-03-11removed integer suffixes in libcollections and libcollectionstestsrinivasreddy-8/+8
2016-03-11Auto merge of #32133 - alexcrichton:linkchecker, r=brsonbors-31/+39
Add a link validator to rustbuild This commit was originally targeted at just adding a link checking script to the rustbuild system. This ended up snowballing a bit to extend rustbuild to be amenable to various tools we have as part of the build system in general. There's a new `src/tools` directory which has a number of scripts/programs that are purely intended to be used as part of the build system and CI of this repository. This is currently inhabited by rustbook, the error index generator, and a new linkchecker script added as part of this PR. I suspect that more tools like compiletest, tidy scripts, snapshot scripts, etc will migrate their way into this directory over time. The commit which adds the error index generator shows the steps necessary to add new tools to the build system, namely: 1. New steps are defined for building the tool and running the tool 2. The dependencies are configured 3. The steps are implemented In terms of the link checker, these commits do a few things: * A new `src/tools/linkchecker` script is added. This will read an entire documentation tree looking for broken relative links (HTTP links aren't followed yet). * A large number of broken links throughout the documentation were fixed. Many of these were just broken when viewed from core as opposed to std, but were easily fixed. * A few rustdoc bugs here and there were fixed
2016-03-10Remove unnecessary mut in docs causing test failures.Nathan Kleyn-1/+1
2016-03-10Rollup merge of #32136 - nathankleyn:improve-docs-for-btreeset, r=steveklabnikSteve Klabnik-0/+30
Add missing documentation examples for BTreeSet. As part of the ongoing effort to document all methods with examples, this commit adds the missing examples for the `BTreeSet` collection type. This is part of issue #29348. r? @steveklabnik
2016-03-09collections: Fix broken doc exampleAlex Crichton-1/+1
PR #32135 was accidentally merged without tests passing, and unfortunately one of the tests added was broken, so this fixes that.
2016-03-10Merge pull request #32135 from nathankleyn/improve-docs-for-btreemapSteve Klabnik-0/+111
Add missing documentation examples for BTreeMap.
2016-03-09Add missing "basic usage" sections to docs, fix review comments.Nathan Kleyn-1/+36
2016-03-09Address review comments to add "basic usage" sections to docs.Nathan Kleyn-0/+38
2016-03-08Add missing documentation examples for BinaryHeap.Nathan Kleyn-0/+106
As part of the ongoing effort to document all methods with examples, this commit adds the missing examples for the `BinaryHeap` collection type. This is part of issue #29348.
2016-03-08Add missing documentation examples for BTreeSet.Nathan Kleyn-0/+30
As part of the ongoing effort to document all methods with examples, this commit adds the missing examples for the `BTreeSet` collection type. This is part of issue #29348.
2016-03-08Add missing documentation examples for BTreeMap.Nathan Kleyn-0/+76
As part of the ongoing effort to document all methods with examples, this commit adds the missing examples for the `BTreeMap` collection type. This is part of issue #29348.
2016-03-08doc: Fix a bunch of broken linksAlex Crichton-31/+39
A few categories: * Links into compiler docs were just all removed as we're not generating compiler docs. * Move up one more level to forcibly go to std docs to fix inlined documentation across the facade crates.
2016-03-08Rollup merge of #32084 - gokhanettin:typo-in-comment, r=alexcrichtonSteve Klabnik-5/+5
Fix typos - mismatching parentheses in comments Fixes mismatching parentheses in the comments of precision example. r? @steveklabnik
2016-03-07Auto merge of #32051 - steveklabnik:gh9447, r=blussbors-1/+1
Fixes #9447
2016-03-06Fix typos - mismatching parentheses in commentsGökhan Karabulut-5/+5
2016-03-06Auto merge of #30884 - durka:inclusive-ranges, r=aturonbors-2/+67
This PR implements [RFC 1192](https://github.com/rust-lang/rfcs/blob/master/text/1192-inclusive-ranges.md), which is triple-dot syntax for inclusive range expressions. The new stuff is behind two feature gates (one for the syntax and one for the std::ops types). This replaces the deprecated functionality in std::iter. Along the way I simplified the desugaring for all ranges. This is my first contribution to rust which changes more than one character outside of a test or comment, so please review carefully! Some of the individual commit messages have more of my notes. Also thanks for putting up with my dumb questions in #rust-internals. - For implementing `std::ops::RangeInclusive`, I took @Stebalien's suggestion from https://github.com/rust-lang/rfcs/pull/1192#issuecomment-137864421. It seemed to me to make the implementation easier and increase type safety. If that stands, the RFC should be amended to avoid confusion. - I also kind of like @glaebhoerl's [idea](https://github.com/rust-lang/rfcs/pull/1254#issuecomment-147815299), which is unified inclusive/exclusive range syntax something like `x>..=y`. We can experiment with this while everything is behind a feature gate. - There are a couple of FIXMEs left (see the last commit). I didn't know what to do about `RangeArgument` and I haven't added `Index` impls yet. Those should be discussed/finished before merging. cc @Gankro since you [complained](https://www.reddit.com/r/rust/comments/3xkfro/what_happened_to_inclusive_ranges/cy5j0yq) cc #27777 #30877 rust-lang/rust#1192 rust-lang/rfcs#1254 relevant to #28237 (tracking issue)
2016-03-04End stdlib module summaries with a full stop.Steve Klabnik-1/+1
Fixes #9447
2016-03-03Auto merge of #31797 - apasel422:issue-28950, r=alexcrichtonbors-2/+4
Closes #28950. r? @eddyb
2016-03-03Auto merge of #32012 - bluss:more-drop-in-place, r=alexcrichtonbors-12/+13
Use `drop_in_place` in Vec and VecDeque We can use drop_in_place's DST capabilities directly in Vec::drop and similarly in VecDeque::drop. I verfied this has the same effect as the previous `needs_drop` code; `drop_in_place` it itself an intrinsic. The VecDeque replacement should be more efficient too, even in release mode (slice iteration makes a more efficient loop than the deque iterator).
2016-03-02Use ptr::drop_in_place in VecDeque::dropUlrik Sverdrup-1/+6
Just like for Vec. This should benefit both non-optimized and optimized performance. Non-optimized since the intrinsic drop_in_place is easily removed, and optimized because iterating the slices is more efficient than using the VecDeque iterators.
2016-03-02Use ptr::drop_in_place in Vec::truncateUlrik Sverdrup-3/+4
2016-03-02Use ptr::drop_in_place in Vec::dropUlrik Sverdrup-8/+3
Directly use the drop glue for [T]. Still optimizes out in -O1 like with the `needs_drop` intrinsic.
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-27add indexing with RangeInclusive in libcore and libcollectionsAlex Burka-2/+66
2016-02-27note work still to be doneAlex Burka-0/+1
In particular, uses of inclusive ranges within the standard library are still waiting. Slices and collections can be sliced with `usize` and `Range*<usize>`, but not yet `Range*Inclusive<usize>`. Also, we need to figure out what to do about `RangeArgument`. Currently it has `start()` and `end()` methods which are pretty much identical to `Range::start` and `Range::end`. For the same reason as Range itself, these methods can't express a range such as `0...255u8` without overflow. The easiest choice, it seems to me, is either changing the meaning of `end()` to be inclusive, or adding a new method, say `last()`, that is inclusive and specifying that `end()` returns `None` in cases where it would overflow. Changing the semantics would be a breaking change, but `RangeArgument` is unstable so maybe we should do it anyway.
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-25Use `box` syntax in `vec!` macroAndrew Paseltiner-2/+4
Closes #28950.
2016-02-25Fix review comments in BTreeMap's Node documentationJonathan S-71/+96
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