summary refs log tree commit diff
path: root/src/libcollections/vec_map.rs
AgeCommit message (Collapse)AuthorLines
2015-04-25Utilize if..let for get_mut doc-comment examplesCorey Farwell-6/+4
2015-04-23std: Add Default/IntoIterator/ToOwned to the preludeAlex Crichton-32/+26
This is an implementation of [RFC 1030][rfc] which adds these traits to the prelude and additionally removes all inherent `into_iter` methods on collections in favor of the trait implementation (which is now accessible by default). [rfc]: https://github.com/rust-lang/rfcs/pull/1030 This is technically a breaking change due to the prelude additions and removal of inherent methods, but it is expected that essentially no code breaks in practice. [breaking-change] Closes #24538
2015-04-13pluralize doc comment verbs and add missing periodsAndrew Paseltiner-2/+2
2015-04-10Fix some typosTibor Benke-1/+1
Signed-off-by: Tibor Benke <ihrwein@gmail.com>
2015-03-27rollup merge of #23738: alexcrichton/snapshotsAlex Crichton-23/+0
Conflicts: src/libcollections/vec.rs
2015-03-27default => or_insert per RFCAlexis Beingessner-4/+4
2015-03-26update everything to use Entry defaultsAlexis-11/+2
2015-03-26entry API v3: replace Entry::get with Entry::default and Entry::default_withAlexis-0/+24
2015-03-26Register new snapshotsAlex Crichton-23/+0
2015-03-23rollup merge of #23598: brson/gateAlex Crichton-0/+21
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-7/+9
- Successful merges: #22954, #23119, #23509, #23561, #23590, #23607, #23608, #23618, #23622, #23639, #23641 - Failed merges: #23401
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-0/+21
2015-03-23Adjust Index/IndexMut impls. For generic collections, we takeNiko Matsakis-1/+41
references. For collections whose keys are integers, we take both references and by-value.
2015-03-18Stabilize Entry typesAaron Turon-7/+9
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-16extract libcollections tests into libcollectionstestJorge Aparicio-507/+0
2015-03-09Rename #[should_fail] to #[should_panic]Steven Fackler-1/+1
2015-03-03Add `: Box<_>` or `::Box<_>` type annotations to various places.Felix S. Klock II-1/+1
This is the kind of change that one is expected to need to make to accommodate overloaded-`box`. ---- Note that this is not *all* of the changes necessary to accommodate Issue 22181. It is merely the subset of those cases where there was already a let-binding in place that made it easy to add the necesasry type ascription. (For unnamed intermediate `Box` values, one must go down a different route; `Box::new` is the option that maximizes portability, but has potential inefficiency depending on whether the call is inlined.) ---- There is one place worth note, `run-pass/coerce-match.rs`, where I used an ugly form of `Box<_>` type ascription where I would have preferred to use `Box::new` to accommodate overloaded-`box`. I deliberately did not use `Box::new` here, because that is already done in coerce-match-calls.rs. ---- Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
2015-02-25Rollup merge of #22157 - tbu-:pr_debug_collections, r=alexcrichtonManish Goregaokar-3/+3
r? @Gankro
2015-02-24Modify collection's `Debug` output to resemble in their content onlyTobias Bucher-3/+3
2015-02-24Use arrays instead of vectors in testsVadim Petrochenkov-3/+3
2015-02-23Rollup merge of #22494 - msiemens:vec_map-append-split_off, r=GankroManish Goregaokar-2/+170
2015-02-22Implement append and split_off for VecMap (RFC 509)Markus Siemens-2/+170
Implements `append()` and `split_off()` for `VecMap`. It's worth noting that `append()` will overwrite existing keys (the RFC doesn't specify how `append()` should handle duplicate keys). cc #19986
2015-02-20Register new snapshotsAlex Crichton-15/+0
2015-02-18rollup merge of #22286: nikomatsakis/variance-4bAlex Crichton-1/+1
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs
2015-02-18rollup merge of #22491: Gankro/into_iterAlex Crichton-2/+2
Conflicts: src/libcollections/bit.rs src/libcollections/linked_list.rs src/libcollections/vec_deque.rs src/libstd/sys/common/wtf8.rs
2015-02-18make FromIterator use IntoIteratorAlexis-1/+1
This breaks all implementors of FromIterator, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument). Users of FromIterator should be unaffected because Iterators are IntoIterator. [breaking-change]
2015-02-18make Extend use IntoIteratorAlexis-1/+1
This breaks all implementors of Extend, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument). Users of Extend should be unaffected because Iterators are IntoIterator. [breaking-change]
2015-02-18std: Stabilize the `hash` moduleAlex Crichton-1/+18
This commit is an implementation of [RFC 823][rfc] which is another pass over the `std::hash` module for stabilization. The contents of the module were not entirely marked stable, but some portions which remained quite similar to the previous incarnation are now marked `#[stable]`. Specifically: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md * `std::hash` is now stable (the name) * `Hash` is now stable * `Hash::hash` is now stable * `Hasher` is now stable * `SipHasher` is now stable * `SipHasher::new` and `new_with_keys` are now stable * `Hasher for SipHasher` is now stable * Many `Hash` implementations are now stable All other portions of the `hash` module remain `#[unstable]` as they are less commonly used and were recently redesigned. This commit is a breaking change due to the modifications to the `std::hash` API and more details can be found on the [RFC][rfc]. Closes #22467 [breaking-change]
2015-02-18Fallout: Port Vec to use `Unique`Niko Matsakis-1/+1
2015-02-17Register new snapshotsAlex Crichton-33/+0
2015-02-17std: Stabilize the IntoIterator traitAlex Crichton-0/+3
Now that the necessary associated types exist for the `IntoIterator` trait this commit stabilizes the trait as-is as well as all existing implementations.
2015-02-13add an associated `Item` type to `IntoIterator`Jorge Aparicio-0/+36
2015-02-11rollup merge of #22151: Gankro/macro-benchAlex Crichton-65/+8
r? @alexcrichton
2015-02-10fix and macro-ify map benches, fixes #22134Alexis-65/+8
2015-02-09std: Rename IntoIterator::Iter to IntoIterAlex Crichton-3/+3
This is in preparation for stabilization of the `IntoIterator` trait. All implementations and references to `Iter` need to be renamed to `IntoIter`. [breaking-change]
2015-02-06make `IndexMut` a super trait over `Index`Jorge Aparicio-2/+0
closes #21630
2015-02-06libcollections: unit test fixesManish Goregaokar-1/+2
2015-02-06remove int_uint feature from libcollectionsAlexis-2/+2
2015-02-06Rollup merge of #21969 - Gankro:collections-cleanup, r=alexcrichtonManish Goregaokar-79/+77
This is 99% burning ints to the ground, but I also got rid of useless annotations or made code more \"idiomatic\" as I went along. Mostly changes in tests.
2015-02-05misc collections code cleanupAlexis-79/+77
2015-02-04stabilize core Entry APIAlexis-15/+8
2015-02-03rollup merge of #21882: Gankro/vec_entryAlex Crichton-1/+193
Building over night, posting for review now. Presumably not much should need change. I consider this necessary to move forward with a proper stabilization of the API. r? @huonw
2015-02-03add naivest entry API to VecMapAlexis-1/+193
2015-02-02rollup merge of #21842: alexcrichton/issue-21839Alex Crichton-6/+2
Now that associated types are fully implemented the iterator adaptors only need type parameters which are associated with actual storage. All other type parameters can either be derived from these (e.g. they are an associated type) or can be bare on the `impl` block itself. This is a breaking change due to the removal of type parameters on these iterator adaptors, but code can fairly easily migrate by just deleting the relevant type parameters for each adaptor. Other behavior should not be affected. Closes #21839 [breaking-change]
2015-02-02remove unused mut qualifiersJorge Aparicio-1/+1
2015-02-02`for x in xs.into_iter()` -> `for x in xs`Jorge Aparicio-1/+1
Also `for x in option.into_iter()` -> `if let Some(x) = option`
2015-02-02`for x in xs.iter_mut()` -> `for x in &mut xs`Jorge Aparicio-1/+1
Also `for x in option.iter_mut()` -> `if let Some(ref mut x) = option`
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-2/+2
2015-02-01std: Remove extra type params on iter adaptorsAlex Crichton-6/+2
Now that associated types are fully implemented the iterator adaptors only need type parameters which are associated with actual storage. All other type parameters can either be derived from these (e.g. they are an associated type) or can be bare on the `impl` block itself. This is a breaking change due to the removal of type parameters on these iterator adaptors, but code can fairly easily migrate by just deleting the relevant type parameters for each adaptor. Other behavior should not be affected. Closes #21839 [breaking-change]
2015-01-30rollup merge of #21631: tbu-/isize_policeAlex Crichton-20/+20
Conflicts: src/libcoretest/iter.rs