about summary refs log tree commit diff
path: root/src/libcollections
AgeCommit message (Collapse)AuthorLines
2015-01-21rollup merge of #21258: aturon/stab-3-indexAlex Crichton-119/+66
Conflicts: src/libcore/ops.rs src/librustc_typeck/astconv.rs src/libstd/io/mem.rs src/libsyntax/parse/lexer/mod.rs
2015-01-21rollup merge of #21457: alexcrichton/issue-21436Alex Crichton-47/+48
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
2015-01-21rollup merge of #21437: FlaPer87/snapshotAlex Crichton-3/+0
r? @alexcrichton
2015-01-21rollup merge of #21396: japaric/no-parens-in-rangeAlex Crichton-3/+3
Conflicts: src/libsyntax/parse/lexer/comments.rs
2015-01-21rollup merge of #21354: eddyb/vec-ufcsAlex Crichton-8/+8
There are two limitations to the macro that this addresses: 1. the expected type is not propagated, coercions don't trigger 2. references inside element expressions don't outlive the `Vec` Both of these limitations are caused by the block in the macro expansion, previously needed to trigger a coercion from `Box<[T; N]>` to `Box<[T]>`, now possible with UFCS.
2015-01-21rollup merge of #21053: apasel422/exactAlex Crichton-0/+7
2015-01-21Fallout from stabilization.Aaron Turon-23/+28
2015-01-21Deprecate slicing methods in favor of notationAaron Turon-94/+28
This commit deprecates `slice`, `slice_from`, `slice_to` and their mutable variants in favor of slice notation. The `as_slice` methods are left intact, for now. [breaking-change]
2015-01-21Stabilize Index traits and most range notationAaron Turon-2/+10
This commit marks as `#[stable]`: * The `Index` and `IndexMut` traits. These are stabilized as taking the index itself *by reference*; after extensive discussion it was determined that this is a better match with our choices elsewhere (e.g. making comparison operators auto-reference), and that the use cases for by-value indices are better handled through `IndexSet`. * The `Range`, `RangeFrom` and `RangeTo` structs, introduced for range notation. * Various impls of `Index` and `IndexMut`. The `FullRange` struct is left unstable as we may wish to rename it to `RangeFull` in the future. This commit also *removes* the `Step` trait in favor of direct implementation of iterator traits on ranges for integers. The `Step` trait was not a terribly useful factoring internally, and it is likely that external integer types are best off implementing range iterators directly. It was removed to simplify the API surface. We can always reintroduce `Step` later if it turns out to be useful. Due to this removal, this is a: [breaking-change]
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-47/+48
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-20implement `ExactSizeIterator` for `slice::{Chunks,ChunksMut}`Andrew Paseltiner-0/+7
2015-01-20Register snapshot for 9006c3cFlavio Percoco-3/+0
2015-01-21Rollup merge of #21388 - aochagavia:collections, r=GankroBarosl LEE-11/+71
**Breaking change**: `VecMap::into_iter` now consumes the `VecMap`. To fix it you should pass the VecMap by value instead of by reference. [breaking-change] r? @Gankro
2015-01-21Rollup merge of #21375 - petrochenkov:ssbsl, r=alexcrichtonBarosl LEE-13/+13
After PR #19766 added implicit coersions `*mut T -> *const T`, the explicit casts can be removed. (The number of such casts turned out to be relatively small).
2015-01-21Rollup merge of #20998 - estsauver:20984, r=steveklabnikBarosl LEE-4/+4
There are a large number of places that incorrectly refer to deriving in comments, instead of derives. If someone could look at src/etc/generate-deriving-span-tests.py, I'm not sure how those tests were passing before/if they were.
2015-01-19remove unnecessary parentheses from range notationJorge Aparicio-3/+3
2015-01-19Implement range and range_mut for BTreePiotr Czarnecki-194/+604
Simplify BTree's iterators, too.
2015-01-19Add test for #21328Adolfo Ochagavía-1/+13
2015-01-19Add a Drain iterator to VecMapAdolfo Ochagavía-6/+55
2015-01-19Make VecMap::into_iter consume the VecMapAdolfo Ochagavía-4/+3
This is a breaking change. To fix it you should pass the VecMap by value instead of by reference. [breaking-change]
2015-01-18Improve the vec![...] macro with UFCS.Eduard Burtescu-8/+8
There are two limitations to the macro that this addresses: 1. the expected type is not propagated, coercions don't trigger 2. references inside element expressions don't outlive the `Vec` Both of these limitations are caused by the block in the macro expansion, previously needed to trigger a coercion from `Box<[T; N]>` to `Box<[T]>`, now possible with UFCS.
2015-01-18auto merge of #21288 : brson/rust/snaps, r=alexcrichtonbors-29/+1
This fixes the issues mentioned in https://github.com/rust-lang/rust/pull/21236, as well as the one https://github.com/rust-lang/rust/issues/21230 where `CFG_BOOTSTRAP_KEY` was being set to simply 'N'. It changes the build such that `RUSTC_BOOTSTRAP_KEY` is only exported on -beta and -stable, so that the behavior of the -dev, -nightly, and snapshot compilers is the same everywhere. Haven't run it completely through 'make check' yet, but the I have verified that the aforementioned issues are fixed. r? @alexcrichton cc @eddyb
2015-01-17Set allow(unstable) in crates that use unstable featuresBrian Anderson-0/+1
Lets them build with the -dev, -nightly, or snapshot compiler
2015-01-17Register new snapshots.Eduard Burtescu-29/+0
2015-01-17add append to vec with testsJeff Belgum-0/+46
2015-01-17s/deriving/derives in Comments/DocsEarl St Sauver-4/+4
There are a large number of places that incorrectly refer to deriving in comments, instead of derives. Fixes #20984
2015-01-17Revert stability for Bitv and BitvSetSimonas Kazlauskas-4/+4
The collections were promoted to stable by mistake and do not match RFC 509. This reverts the stability back to unstable. [breaking-change] since previously stable API became unstable. Fixes #21193
2015-01-17Remove unnecessary explicit conversions to *const Twe-13/+13
2015-01-15rollup merge of #21168: aidanhs/aphs-doc-vec-heapAlex Crichton-1/+1
...to make it slightly clearer that there's not much point in boxing a vec. On a different note, I read the contribution guidelines (https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#pull-request-procedure) which say I should update the copyright date for this file. But I can see that nobody else has done this so far this year, despite there being a fair number of commits. Does that instruction need removing?
2015-01-15rollup merge of #21161: japaric/ufcs-hashAlex Crichton-0/+2
expansion now uses `::std::hash::Hash::hash(&*__self_0_0, __arg_0)` instead of `(*__self_0_0).hash(__arg_0)` closes #21160 r? @alexcrichton
2015-01-15rollup merge of #21126: sleepynate/dlist-examplesAlex Crichton-6/+166
Just some documentation test examples for the DList collection.
2015-01-15rollup merge of #21036: renato-zannon/into-iter-implsAlex Crichton-0/+3
fixes #21027
2015-01-15rollup merge of #20976: jbcrail/rm-unused-importAlex Crichton-1/+0
The BorrowFrom trait was unused by the tests.
2015-01-15rollup merge of #20463: amaranth/black_box_outputAlex Crichton-4/+4
By returning the passed value black_box can be used on data being passed to a function being benchmarked. This ensures the compiler does not optimize the function for the input which could result in the entire function being optimized away.
2015-01-15Explicitly note that vector contents are on the heapAidan Hobson Sayers-1/+1
2015-01-14use UFCS in `#[deriving(Hash)]`Jorge Aparicio-0/+2
expansion now uses `::std::hash::Hash::hash(&*__self_0_0, __arg_0)` instead of `(*__self_0_0).hash(__arg_0)` closes #21160
2015-01-14Add examples for DList methods.nathan dotz-6/+166
2015-01-14auto merge of #21061 : japaric/rust/range, r=nick29581bors-8/+8
2015-01-13Fix test failuresTravis Watkins-4/+4
2015-01-12cleanup: `&foo[0..a]` -> `&foo[..a]`Jorge Aparicio-8/+8
2015-01-12auto merge of #20896 : sfackler/rust/atomic-rename, r=alexcrichtonbors-2/+2
Change any use of AtomicInt to AtomicIsize and AtomicUint to AtomicUsize Closes #20893 [breaking-change]
2015-01-12Vec's IntoIter should be Send/Sync when Vec is (fixes #21027)Renato Zannon-0/+3
2015-01-11Remove unused import.Joseph Crail-1/+0
2015-01-11Rename AtomicInt and AtomicUintSteven Fackler-2/+2
Change any use of AtomicInt to AtomicIsize and AtomicUint to AtomicUsize Closes #20893 [breaking-change]
2015-01-11auto merge of #20406 : TimDumol/rust/dlist-append-split-off, r=Gankrobors-41/+161
Implements the `append()` and `split_off()` methods proposed by the collections reform part 2 RFC. RFC: https://github.com/rust-lang/rfcs/pull/509 Tracking issue: https://github.com/rust-lang/rust/issues/19986
2015-01-11auto merge of #20859 : mahkoh/rust/as_mut_vec, r=nikomatsakisbors-0/+15
Closes #20822
2015-01-10add inline to every String functionJulian Orth-0/+15
2015-01-10Merge pull request #20771 from Kimundi/vec-macro-repeatbors-1/+5
Enabled the `vec![]` macro to use the `[a; b]` repeat syntax. Reviewed-by: alexcrichton
2015-01-09Add append() and split_off() to DList.Tim Dumol-41/+161
2015-01-08Merge pull request #20766 from tsurai/patch-1bors-1/+1
doc: Fix unresolved import in Bitv example Reviewed-by: alexcrichton