about summary refs log tree commit diff
path: root/src/libcore/iter.rs
AgeCommit message (Collapse)AuthorLines
2015-01-21rollup merge of #21258: aturon/stab-3-indexAlex Crichton-37/+67
Conflicts: src/libcore/ops.rs src/librustc_typeck/astconv.rs src/libstd/io/mem.rs src/libsyntax/parse/lexer/mod.rs
2015-01-21Stabilize Index traits and most range notationAaron Turon-37/+67
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-20also forward Iterator::size_hint()Jorge Aparicio-0/+4
2015-01-19impl Iterator for &mut Iterator and Box<Iterator>Jorge Aparicio-0/+10
closes #20953 closes #21361
2015-01-17Register new snapshots.Eduard Burtescu-2/+2
2015-01-12auto merge of #20889 : Manishearth/rust/trait-error, r=nikomatsakisbors-0/+2
fixes #20783 r? @nikomatsakis
2015-01-11Rename #[on_unimplemented] -> #[rustc_on_unimplemented]Manish Goregaokar-2/+2
2015-01-11Add ability to attach custom #[on_unimplemented] error messages for ↵Manish Goregaokar-0/+2
unimplemented traits (fixes #20783)
2015-01-09std: Mark two missing functions as #[stable]Alex Crichton-0/+2
Both `Extend::extend` and `DoubleEndedIterator::next_back` were intended to be stable, but they mistakenly didn't have the `#[stable]` tag.
2015-01-08Improvements to feature stagingBrian Anderson-22/+22
This gets rid of the 'experimental' level, removes the non-staged_api case (i.e. stability levels for out-of-tree crates), and lets the staged_api attributes use 'unstable' and 'deprecated' lints. This makes the transition period to the full feature staging design a bit nicer.
2015-01-07Test fixes and rebase conflictsAlex Crichton-1/+1
2015-01-07rollup merge of #20721: japaric/snapAlex Crichton-1/+1
Conflicts: src/libcollections/vec.rs src/libcore/fmt/mod.rs src/librustc/lint/builtin.rs src/librustc/session/config.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/context.rs src/librustc_trans/trans/type_.rs src/librustc_typeck/check/_match.rs src/librustdoc/html/format.rs src/libsyntax/std_inject.rs src/libsyntax/util/interner.rs src/test/compile-fail/mut-pattern-mismatched.rs
2015-01-07fix the `&mut _` patternsJorge Aparicio-1/+1
2015-01-08Rename `target_word_size` to `target_pointer_width`Nick Cameron-2/+2
Closes #20421 [breaking-change]
2015-01-06rollup merge of #20656: japaric/at-cleanAlex Crichton-78/+75
2015-01-07markers -> markerNick Cameron-1/+1
2015-01-07Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`Nick Cameron-1/+1
[breaking-change]
2015-01-06cleanup: use short AT notation (`Ty::Item` instead of `<Ty as Trait>::Item`)Jorge Aparicio-78/+75
2015-01-05More test fixes!Alex Crichton-157/+0
2015-01-05Revert "Remove i suffix in docs"Alex Crichton-29/+186
This reverts commit f031671c6ea79391eeb3e1ad8f06fe0e436103fb. Conflicts: src/libcollections/slice.rs src/libcore/iter.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/rwlock.rs
2015-01-05Test fixesAlex Crichton-53/+0
2015-01-05rollup merge of #20560: aturon/stab-2-iter-ops-sliceAlex Crichton-302/+341
Conflicts: src/libcollections/slice.rs src/libcore/iter.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/rwlock.rs
2015-01-05Remove i suffix in docsSteve Klabnik-39/+39
2015-01-05Stabilization of impls and fallout from stabilizationAaron Turon-1/+1
2015-01-05Final alpha stabilization of core::iterAaron Turon-354/+340
This commit wraps up the adjustments to the iterator for recent language changes. * Moves `rposition` from `ExactSizeIterator` to `IteratorExt` using a `where` clause, thereby removing the `ExactSizeIterator: DoubleEndedIterator` constraint. * Merges `MutableDoubleEndedIterator` into `IteratorExt`, renaming `reverse_` to `reverse_in_place`. * Merges `IteratorOrdExt`, `IteratorCloneExt` and `CloneIteratorExt` into `IteratorExt` using `where` clauses. Marks as `#[stable]`: * the `iter` module itself * `FromIterator`, `Extend` * `Iterator`, `IteratorExt` * `map` * `filter` * `filter_map` * `skip_while` * `take_while` * `scan` * `flat_map` * `inspect` * `collect` * `fold` * `all` * `any` * `find` * `rposition` * `max`, `min` * Various adapter types related to the above methods Because of the trait merging, this is a: [breaking-change]
2015-01-04Merge pull request #20500 from globin/fix/range-sugarbors-6/+6
Fix range sugar Reviewed-by: nick29581
2015-01-04fix range sugarRobin Gloster-6/+6
2015-01-03Remove deprecated functionalityAlex Crichton-11/+0
This removes a large array of deprecated functionality, regardless of how recently it was deprecated. The purpose of this commit is to clean out the standard libraries and compiler for the upcoming alpha release. Some notable compiler changes were to enable warnings for all now-deprecated command line arguments (previously the deprecated versions were silently accepted) as well as removing deriving(Zero) entirely (the trait was removed). The distribution no longer contains the libtime or libregex_macros crates. Both of these have been deprecated for some time and are available externally.
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-25/+25
2015-01-03sed -i -s 's/\bmod,/self,/g' **/*.rsJorge Aparicio-1/+1
2015-01-03use assoc types in binop traitsJorge Aparicio-1/+1
2015-01-03core: merge IteratorPairExt into IteratorExtJorge Aparicio-10/+6
2015-01-03core: merge DoubleEndedIteratorExt into IteratorExtJorge Aparicio-25/+18
2015-01-03core: use assoc types in Iterator et alJorge Aparicio-215/+363
2015-01-02rollup merge of #20410: japaric/assoc-typesAlex Crichton-4/+4
Conflicts: src/liballoc/lib.rs src/libcollections/lib.rs src/libcollections/slice.rs src/libcore/ops.rs src/libcore/prelude.rs src/libcore/ptr.rs src/librustc/middle/traits/project.rs src/libstd/c_str.rs src/libstd/io/mem.rs src/libstd/io/mod.rs src/libstd/lib.rs src/libstd/path/posix.rs src/libstd/path/windows.rs src/libstd/prelude.rs src/libstd/rt/exclusive.rs src/libsyntax/lib.rs src/test/compile-fail/issue-18566.rs src/test/run-pass/deref-mut-on-ref.rs src/test/run-pass/deref-on-ref.rs src/test/run-pass/dst-deref-mut.rs src/test/run-pass/dst-deref.rs src/test/run-pass/fixup-deref-mut.rs src/test/run-pass/issue-13264.rs src/test/run-pass/overloaded-autoderef-indexing.rs
2015-01-02rollup merge of #20341: nikomatsakis/impl-trait-for-trait-2Alex Crichton-3/+4
Conflicts: src/librustc/middle/traits/mod.rs src/libstd/io/mod.rs src/test/run-pass/builtin-superkinds-self-type.rs
2015-01-02rollup merge of #20386: frewsxcv/rm-reexportsAlex Crichton-3/+3
Part of #19253 [breaking-change]
2015-01-02core: use assoc types in `Deref[Mut]`Jorge Aparicio-4/+4
2015-01-02Fix fallout from change, adding explicit `Sized` annotations where necessary.Niko Matsakis-3/+4
2015-01-02Fallout - change array syntax to use `;`Nick Cameron-1/+1
2014-12-31Remove core::iter::MinMaxResult::* public reexportCorey Farwell-3/+3
Part of #19253 [breaking-change]
2014-12-30Fallout from stabilizationAaron Turon-1/+1
2014-12-30Adjustments from reviewAaron Turon-3/+7
2014-12-30std::iter: Add partition and unzip methods to iteratorsAaron Turon-15/+76
2014-12-24Review changesNick Cameron-0/+58
2014-12-22Insert coercions to fn pointer types required for the new typesNiko Matsakis-0/+3
post-unboxed-closure-conversion. This requires a fair amount of annoying coercions because all the `map` etc types are defined generically over the `F`, so the automatic coercions don't propagate; this is compounded by the need to use `let` and not `as` due to stage0. That said, this pattern is to a large extent temporary and unusual.
2014-12-20Stabilize cloneAaron Turon-0/+9
This patch marks `clone` stable, as well as the `Clone` trait, but leaves `clone_from` unstable. The latter will be decided by the beta. The patch also marks most manual implementations of `Clone` as stable, except where the APIs are otherwise deprecated or where there is uncertainty about providing `Clone`.
2014-12-19libcore: use `#[deriving(Copy)]`Jorge Aparicio-12/+4
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-25/+25
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-17rollup merge of #19873: drewm1980/masterAlex Crichton-26/+26
In US english, "that" is used in restrictive clauses in place of "which", and often affects the meaning of sentences. In UK english and many dialects, no distinction is made. While Rust devs want to avoid unproductive pedanticism, it is worth at least being uniform in documentation such as: http://doc.rust-lang.org/std/iter/index.html and also in cases where correct usage of US english clarifies the sentence.