about summary refs log tree commit diff
path: root/src/libcore/iter.rs
AgeCommit message (Collapse)AuthorLines
2016-01-13Fix some broken and missing links in the docsOliver Middleton-1/+1
2016-01-10Remove unneeded #[lang = "iterator"]Guillaume Gomez-1/+0
2016-01-04Feature-gate defaulted type parameters outside of types.Niko Matsakis-2/+2
2015-12-30Rollup merge of #30373 - ChrisBuchholz:master, r=steveklabnikSteve Klabnik-7/+13
The current explanation for scan() is not very clear as to how it works, especially when it compares itself to fold(). I believe these changes makes it all a bit more clear for the reader, and makes it easier to understand the example code. r? @steveklabnik
2015-12-15Clearer leading sentenceChristoffer Buchholz-2/+2
2015-12-15Remove emoji from docsmitaa-1/+1
2015-12-14make scan() usage more explanatoryChris Buchholz-7/+13
2015-12-10std: Remove deprecated functionality from 1.5Alex Crichton-84/+0
This is a standard "clean out libstd" commit which removes all 1.5-and-before deprecated functionality as it's now all been deprecated for at least one entire cycle.
2015-12-09doc: these are just renames, so avoid duplicationTshepang Lekhonkhobe-30/+2
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-2/+45
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-11-29libcore/iter: fix typosIvan Stankovic-4/+4
2015-11-20Rename #[deprecated] to #[rustc_deprecated]Vadim Petrochenkov-5/+5
2015-11-18Auto merge of #29083 - petrochenkov:stability3, r=alexcrichtonbors-0/+10
What this patch does: - Stability annotations are now based on "exported items" supplied by rustc_privacy and not "public items". Exported items are as accessible for external crates as directly public items and should be annotated with stability attributes. - Trait impls require annotations now. - Reexports require annotations now. - Crates themselves didn't require annotations, now they do. - Exported macros are annotated now, but these annotations are not used yet. - Some useless annotations are detected and result in errors - Finally, some small bugs are fixed - deprecation propagates from stable deprecated parents, items in blocks are traversed correctly (fixes https://github.com/rust-lang/rust/issues/29034) + some code cleanup.
2015-11-17More docs for FromIteratorSteve Klabnik-16/+132
And modifying IntoIterator for consisntency with it. Part of #29360
2015-11-18Add missing annotations and some testsVadim Petrochenkov-0/+10
2015-11-12libcore: deny warnings in doctestsKevin Butler-3/+5
2015-11-10Some cleanup on after #29684Steve Klabnik-14/+13
* wrap to 80 cols * small grammar fix, missing 'the'
2015-11-08Explain that size_hint cannot be trustedStepan Koltsov-0/+23
Same applies to `len()` function of `ExactSizeIterator` trait.
2015-11-07Remove duplicate words from docsAndrew Paseltiner-2/+2
2015-11-06Auto merge of #29643 - petrochenkov:stability5, r=alexcrichtonbors-1/+0
Also remove `stable` stability annotations from inherent impls (There will be a warning for useless stability annotations soon.) r? @Gankro
2015-11-06Remove stability annotations from trait impl itemsVadim Petrochenkov-1/+0
Remove `stable` stability annotations from inherent impls
2015-11-05Rollup merge of #29539 - shepmaster:empty-iterator-docs, r=GankroSteve Klabnik-0/+8
2015-11-03Mention what iterator terminators do with an empty iteratorJake Goulding-0/+8
2015-10-29doc: make example more simpleTshepang Lekhonkhobe-3/+3
2015-10-27Adds tons of documentation for IteratorSteve Klabnik-261/+1183
This adds lots of examples, clarifies text, and just generally improves the documentation for Iterator.
2015-10-25Auto merge of #29266 - apasel422:wf, r=alexcrichtonbors-1/+1
Using these traits in an object context previously resulted in an RFC 1214 warning.
2015-10-25Auto merge of #29254 - alexcrichton:stabilize-1.5, r=brsonbors-9/+17
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-25std: Stabilize library APIs for 1.5Alex Crichton-9/+17
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-23Make `{Default, From, FromIterator, One, Zero}` well-formedAndrew Paseltiner-1/+1
Using these traits in an object context previously resulted in an RFC 1214 warning.
2015-10-23Document a bunch of std::iter traitsSteve Klabnik-25/+315
This adds a bunch of documentation for most of the traits in std::iter
2015-10-19Rollup merge of #29169 - apasel422:spell, r=steveklabnikSteve Klabnik-1/+1
r? @steveklabnik
2015-10-19Rollup merge of #29027 - steveklabnik:iter_docs, r=manishearthSteve Klabnik-20/+137
Due to the way iterators work, the std::iter module is chock full of structs that you, humble Rust programmer, will never actually use. However, they have URLs, and therefore get linked to, because they are real structs that do exist. So, rather than just have a tiny sentence about each one of them, this patch adds links back to the functions and methods on Iterator which actually create the structs, where helpful documentation already exists.
2015-10-19Correct spelling in docsAndrew Paseltiner-1/+1
2015-10-18docs: change where clause to boundLiigo Zhuang-1/+1
https://github.com/rust-lang/rust/blob/master/src/libcore/iter.rs#L1541
2015-10-15Rollup merge of #29022 - apasel422:spell, r=steveklabnikManish Goregaokar-1/+1
r? @steveklabnik
2015-10-14Properly link up iterator documentationSteve Klabnik-20/+137
Due to the way iterators work, the std::iter module is chock full of structs that you, humble Rust programmer, will never actually use. However, they have URLs, and therefore get linked to, because they are real structs that do exist. So, rather than just have a tiny sentence about each one of them, this patch adds links back to the functions and methods on Iterator which actually create the structs, where helpful documentation already exists.
2015-10-13Document the free functions of std::iterSteve Klabnik-1/+109
Flesh the docs out with examples.
2015-10-13Correct spelling in docsAndrew Paseltiner-1/+1
2015-10-12Auto merge of #28914 - steveklabnik:doc_iterator, r=alexcrichtonbors-29/+271
This replaces what was there with a comprehensive overview. Thanks to @hoverbear for suggesting that these docs needed improvement.
2015-10-12Write better module-level docs for std::iterSteve Klabnik-29/+271
This replaces what was there with a comprehensive overview.
2015-10-08Format code-like text in Iterator::cloned doc-commentCorey Farwell-1/+1
2015-10-07Auto merge of #28877 - sourcefrog:doc-fuse, r=alexcrichtonbors-0/+3
2015-10-06Link from Fuse type docstring to iter.fuse that creates themMartin Pool-0/+3
2015-10-02libcore: Chain must exhaust a before b.Steven Allen-1/+6
part of #28810
2015-09-30Auto merge of #28738 - apasel422:peekable, r=alexcrichtonbors-9/+1
2015-09-29Derive `Clone` for `Peekable`Andrew Paseltiner-9/+1
2015-09-29Remove redundant uses of Iterator::by_ref()Ulrik Sverdrup-5/+5
2015-09-03take mapped function by mutable referencellogiq-4/+4
2015-09-03clippy improvements to iteratorsllogiq-6/+6
2015-08-27Auto merge of #28028 - tshepang:add-size_hint-example, r=alexcrichtonbors-0/+7