about summary refs log tree commit diff
path: root/src/libstd/collections
AgeCommit message (Collapse)AuthorLines
2015-04-21Model lexer: Fix remaining issuesPiotr Czarnecki-6/+0
2015-04-18Utilize if..let for get_mut doc-comment examplesCorey Farwell-3/+2
2015-04-16Fixed typo in hash_map::Entry documentationAram Visser-1/+0
2015-04-14Positive case of `len()` -> `is_empty()`Tamir Duberstein-1/+1
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14rollup merge of #24377: apasel422/docsAlex Crichton-8/+8
Conflicts: src/libstd/net/ip.rs src/libstd/sys/unix/fs.rs src/libstd/sys/unix/mod.rs src/libstd/sys/windows/mod.rs
2015-04-14test: Fixup many library unit testsAlex Crichton-2/+2
2015-04-13pluralize doc comment verbs and add missing periodsAndrew Paseltiner-8/+8
2015-04-10Fix some typosTibor Benke-1/+1
Signed-off-by: Tibor Benke <ihrwein@gmail.com>
2015-04-07std: Deny most warnings in doctestsAlex Crichton-163/+180
Allow a few specific ones but otherwise this helps ensure that our examples are squeaky clean! Closes #18199
2015-04-01Fallout in public-facing and semi-public-facing libsNiko Matsakis-1/+7
2015-03-31rollup merge of #23288: alexcrichton/issue-19470Alex Crichton-1/+1
This is a deprecated attribute that is slated for removal, and it also affects all implementors of the trait. This commit removes the attribute and fixes up implementors accordingly. The primary implementation which was lost was the ability to compare `&[T]` and `Vec<T>` (in that order). This change also modifies the `assert_eq!` macro to not consider both directions of equality, only the one given in the left/right forms to the macro. This modification is motivated due to the fact that `&[T] == Vec<T>` no longer compiles, causing hundreds of errors in unit tests in the standard library (and likely throughout the community as well). Closes #19470 [breaking-change]
2015-03-31rollup merge of #23908: aturon/stab-more-stragglersAlex Crichton-4/+2
* The `io::Seek` trait. * The `Iterator::{partition, unsip}` methods. * The `Vec::into_boxed_slice` method. * The `LinkedList::append` method. * The `{or_insert, or_insert_with` methods in the `Entry` APIs. r? @alexcrichton
2015-03-31std: Clean out #[deprecated] APIsAlex Crichton-1/+1
This commit cleans out a large amount of deprecated APIs from the standard library and some of the facade crates as well, updating all users in the compiler and in tests as it goes along.
2015-03-31Stabilize a few remaining stragglersAaron Turon-4/+2
* The `io::Seek` trait, and `SeekFrom` enum. * The `Iterator::{partition, unsip}` methods. * The `Vec::into_boxed_slice` method. * The `LinkedList::append` method. * The `{or_insert, or_insert_with` methods in the `Entry` APIs.
2015-03-31std: Remove #[old_orphan_check] from PartialEqAlex Crichton-1/+1
This is a deprecated attribute that is slated for removal, and it also affects all implementors of the trait. This commit removes the attribute and fixes up implementors accordingly. The primary implementation which was lost was the ability to compare `&[T]` and `Vec<T>` (in that order). This change also modifies the `assert_eq!` macro to not consider both directions of equality, only the one given in the left/right forms to the macro. This modification is motivated due to the fact that `&[T] == Vec<T>` no longer compiles, causing hundreds of errors in unit tests in the standard library (and likely throughout the community as well). cc #19470 [breaking-change]
2015-03-30std: Standardize (input, output) param orderingsAlex Crichton-2/+2
This functions swaps the order of arguments to a few functions that previously took (output, input) parameters, but now take (input, output) parameters (in that order). The affected functions are: * ptr::copy * ptr::copy_nonoverlapping * slice::bytes::copy_memory * intrinsics::copy * intrinsics::copy_nonoverlapping Closes #22890 [breaking-change]
2015-03-29Rollup merge of #23814 - steveklabnik:gh23320, r=alexcrichtonManish Goregaokar-2/+18
Fixes #23320
2015-03-29Auto merge of #23810 - sfackler:debug-collections, r=alexcrichtonbors-16/+2
The collections debug helpers no longer prefix output with the collection name, in line with the current conventions for Debug implementations. Implementations that want to preserve the current behavior can simply add a `try!(write!(fmt, "TypeName "));` at the beginning of the `fmt` method. [breaking-change]
2015-03-28Remove IteratorExtSteven Fackler-5/+3
All methods are inlined into Iterator with `Self: Sized` bounds to make sure Iterator is still object safe. [breaking-change]
2015-03-28Document properties for Eq + HashSteve Klabnik-2/+18
Fixes #23320
2015-03-28Fold collections debug implsSteven Fackler-10/+2
Also convert [T]'s Debug impl. The behavior of the alternate flag here's changing.
2015-03-28Update debug helpers and add list builderSteven Fackler-14/+8
The collections debug helpers no longer prefix output with the collection name, in line with the current conventions for Debug implementations. Implementations that want to preserve the current behavior can simply add a `try!(write!(fmt, "TypeName "));` at the beginning of the `fmt` method. [breaking-change]
2015-03-28Rollup merge of #23803 - richo:unused-braces, r=ManishearthManish Goregaokar-1/+1
Pretty much what it says on the tin.
2015-03-28cleanup: Remove unused braces in use statementsRicho Healey-1/+1
2015-03-27rollup merge of #23741: alexcrichton/remove-int-uintAlex Crichton-12/+12
Conflicts: src/librustc/middle/ty.rs src/librustc_trans/trans/adt.rs src/librustc_typeck/check/mod.rs src/libserialize/json.rs src/test/run-pass/spawn-fn.rs
2015-03-27rollup merge of #23738: alexcrichton/snapshotsAlex Crichton-16/+0
Conflicts: src/libcollections/vec.rs
2015-03-27rollup merge of #23535: pnkfelix/fsk-filling-dropAlex Crichton-1/+1
Replace zeroing-on-drop with filling-on-drop. This is meant to set the stage for removing *all* zeroing and filling (on drop) in the future. Note that the code is meant to be entirely abstract with respect to the particular values used for the drop flags: the final commit demonstrates how to go from zeroing-on-drop to filling-on-drop by changing the value of three constants (in two files). See further discussion on the internals thread: http://internals.rust-lang.org/t/attention-hackers-filling-drop/1715/11 [breaking-change] especially for structs / enums using `#[unsafe_no_drop_flag]`.
2015-03-27default => or_insert per RFCAlexis Beingessner-5/+6
2015-03-26update everything to use Entry defaultsAlexis-8/+2
2015-03-26entry API v3: replace Entry::get with Entry::default and Entry::default_withAlexis-1/+25
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-12/+12
Now that support has been removed, all lingering use cases are renamed.
2015-03-26Register new snapshotsAlex Crichton-16/+0
2015-03-26Switch drop-flag to `u8` to allow special tags to instrument state.Felix S. Klock II-1/+1
Refactored code so that the drop-flag values for initialized (`DTOR_NEEDED`) versus dropped (`DTOR_DONE`) are given explicit names. Add `mem::dropped()` (which with `DTOR_DONE == 0` is semantically the same as `mem::zeroed`, but the point is that it abstracts away from the particular choice of value for `DTOR_DONE`). Filling-drop needs to use something other than `ptr::read_and_zero`, so I added such a function: `ptr::read_and_drop`. But, libraries should not use it if they can otherwise avoid it. Fixes to tests to accommodate filling-drop.
2015-03-23rollup merge of #23598: brson/gateAlex Crichton-0/+15
Conflicts: src/compiletest/compiletest.rs src/libcollections/lib.rs src/librustc_back/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/libtest/lib.rs src/test/run-make/rustdoc-default-impl/foo.rs src/test/run-pass/env-home-dir.rs
2015-03-23rollup merge of #23648: steveklabnik/rollupAlex Crichton-8/+8
- Successful merges: #22954, #23119, #23509, #23561, #23590, #23607, #23608, #23618, #23622, #23639, #23641 - Failed merges: #23401
2015-03-23rollup merge of #23637: apasel422/iterAlex Crichton-0/+25
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-0/+15
2015-03-23Rollup merge of #23509 - aturon:stab-entry, r=GankroSteve Klabnik-8/+8
This commit marks as `#[stable]` the `Entry` types for the maps provided by `std`. The main reason these had been left unstable previously was uncertainty about an eventual trait design, but several plausible designs have been proposed that all work fine with the current type definitions. r? @Gankro
2015-03-23Adjust Index/IndexMut impls. For generic collections, we takeNiko Matsakis-4/+20
references. For collections whose keys are integers, we take both references and by-value.
2015-03-23implement `Clone` for various iteratorsAndrew Paseltiner-0/+25
2015-03-20Future-proof indexing on maps: remove IndexMutAaron Turon-13/+1
This commit removes the `IndexMut` impls on `HashMap` and `BTreeMap`, in order to future-proof the API against the eventual inclusion of an `IndexSet` trait. Ideally, we would eventually be able to support: ```rust map[owned_key] = val; map[borrowed_key].mutating_method(arguments); &mut map[borrowed_key]; ``` but to keep the design space as unconstrained as possible, we do not currently want to support `IndexMut`, in case some other strategy will eventually be needed. Code currently using mutating index notation can use `get_mut` instead. [breaking-change] Closes #23448
2015-03-18Stabilize Entry typesAaron Turon-8/+8
This commit marks as `#[stable]` the `Entry` types for the maps provided by `std`. The main reason these had been left unstable previously was uncertainty about an eventual trait design, but several plausible designs have been proposed that all work fine with the current type definitions.
2015-03-18Register new snapshotsAlex Crichton-7/+0
2015-03-16impl {i,u}{8,16,32,64,size}Jorge Aparicio-0/+2
2015-03-16impl<T> *const T, impl<T> *mut TJorge Aparicio-0/+3
2015-03-16document undefined collection behavior with interior mutabilityAndrew Paseltiner-0/+11
closes #23327
2015-03-11Example -> ExamplesSteve Klabnik-45/+45
This brings comments in line with https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-conventions.md#using-markdown
2015-03-09Rename #[should_fail] to #[should_panic]Steven Fackler-1/+1
2015-03-05Rollup merge of #22973 - djmally:coll_docs, r=GankroManish Goregaokar-6/+7
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-2/+2