Konrad Borowski
a70b240189
Make iter::Empty<T> implement Send and Sync for any T
2020-01-18 18:50:10 +01:00
Mark Rousskov
82184440ec
Propagate cfg bootstrap
2019-12-18 12:16:19 -05:00
Oliver Scherer
5e17e39881
Require stable/unstable annotations for the constness of all stable functions with a const modifier
2019-12-13 11:27:02 +01:00
David Tolnay
95e00bfed8
Format libcore with rustfmt
...
This commit applies rustfmt with default settings to files in
src/libcore *that are not involved in any currently open PR* to minimize
merge conflicts. The list of files involved in open PRs was determined
by querying GitHub's GraphQL API with this script:
https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8
With the list of files from the script in `outstanding_files`, the
relevant commands were:
$ find src/libcore -name '*.rs' | xargs rustfmt --edition=2018
$ rg libcore outstanding_files | xargs git checkout --
Repeating this process several months apart should get us coverage of
most of the rest of libcore.
2019-11-26 23:02:11 -08:00
Josh Stone
40ecbc7b7d
Avoid closures in OnceWith and Successors
2019-08-12 15:03:44 -07:00
Mazdak Farrokhzad
dbfbadeac4
libcore: deny more...
2019-04-19 01:37:12 +02:00
Taiki Endo
360432f1e8
libcore => 2018
2019-04-18 14:47:35 +09:00
Geoffry Song
7ce0b67272
Fix OnceWith docstring.
...
This was incorrectly copypasta'd from RepeatWith.
2019-03-29 15:03:14 -07:00
lukaslueg
d1fcd86738
Update sources.rs
...
The current language may be amusing, yet is just imprecise and most especially difficult to understand for someone who speaks English as a foreign language.
2019-03-14 17:06:46 +01:00
Simon Sapin
3906cb9187
Stabilize iter::from_fn
...
FCP: https://github.com/rust-lang/rust/issues/55977#issuecomment-463964234
2019-02-19 14:10:07 +01:00
Simon Sapin
95d2795907
Stabilize iter::successors
...
FCP: https://github.com/rust-lang/rust/issues/58045#issuecomment-464674773
2019-02-19 13:58:55 +01:00
Sebastian Dröge
86d8e47c11
Fix broken grammar in iter::from_fn() docs
2019-02-06 19:24:20 +02:00
Simon Sapin
61e92b586b
Rename iter::unfold to iter::from_fn and remove explicit state
...
This API is unstable.
CC https://github.com/rust-lang/rust/issues/55977#issuecomment-459657195
2019-02-01 23:59:11 +01:00
Stjepan Glavina
3a1f0131a6
Add another feature(iter_once_with)
2019-01-14 17:36:34 +01:00
Stjepan Glavina
84718c1999
Add feature(iter_once_with)
2019-01-14 17:20:41 +01:00
Stjepan Glavina
7915732714
Fix intradoc link and update issue number
2019-01-13 21:24:15 +01:00
Stjepan Glavina
04c74f46f0
Add core::iter::once_with
2019-01-13 16:58:08 +01:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Simon Sapin
a4279a07e2
Capitalize
2018-11-20 18:22:40 +01:00
Simon Sapin
8a5bbd9a4e
Add tracking issue for unfold and successors
2018-11-20 18:22:40 +01:00
Simon Sapin
641c4909e4
Add std::iter::successors
2018-11-20 18:22:40 +01:00
Simon Sapin
22228186c0
Copy is best avoided on iterators
2018-11-20 18:22:40 +01:00
Simon Sapin
544ad37753
Unfold<St, F>: Debug without F: Debug
2018-11-20 18:22:40 +01:00
Simon Sapin
48aae09e9f
Add std::iter::unfold
2018-11-20 18:22:40 +01:00
Mazdak Farrokhzad
5b89877dda
constify parts of libcore.
2018-11-10 01:07:32 +01:00
Thayne McCombs
87941b079a
Stabilize iterator_repeat_with
...
Fixes #48169
2018-06-02 15:52:09 -06:00
Ulrik Sverdrup
c7c23fe948
core: Update stability attributes for FusedIterator
2018-03-03 14:23:05 +01:00
Ulrik Sverdrup
bc651cac8d
core: Stabilize FusedIterator
...
FusedIterator is a marker trait that promises that the implementing
iterator continues to return `None` from `.next()` once it has returned
`None` once (and/or `.next_back()`, if implemented).
The effects of FusedIterator are already widely available through
`.fuse()`, but with stable `FusedIterator`, stable Rust users can
implement this trait for their iterators when appropriate.
2018-03-03 14:14:03 +01:00
Mazdak Farrokhzad
6e27aa88a7
core::iter::repeat_with: fix spelling, s/not/note
2018-02-16 22:14:32 +01:00
Mazdak Farrokhzad
db13296b6f
core::iter::repeat_with: fix missing word, see @Pazzaz's review
2018-02-13 06:20:17 +01:00
Mazdak Farrokhzad
91a4b9044d
core::iter::repeat_with: tracking issue is #48169
2018-02-12 21:47:59 +01:00
Mazdak Farrokhzad
9cee79a7ff
core::iter::repeat_with: document DoubleEndedIterator behavior
2018-02-12 18:03:56 +01:00
Mazdak Farrokhzad
efa332038c
core::iter::repeat_with: fix doc tests
2018-02-12 09:18:22 +01:00
Mazdak Farrokhzad
1af9ee1350
core::iter::repeat_with: derive Copy, Clone, Debug
2018-02-12 08:35:12 +01:00
Mazdak Farrokhzad
c4099ca4b1
core::iter::repeat_with: general fixes
2018-02-12 08:25:39 +01:00
Mazdak Farrokhzad
0f789aad2b
add core::iter::repeat_with
2018-02-12 08:05:46 +01:00
oberien
a1809d5784
Implement TrustedLen for Take<Repeat> and Take<RangeFrom>
2018-02-04 16:09:32 +01:00
Corey Farwell
e7b0f2badf
Remove function invokation parens from documentation links.
...
This was never established as a convention we should follow in the 'More
API Documentation Conventions' RFC:
https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-03-13 21:43:18 -04:00
Clar Charr
c903210f68
TrustedLen for Empty and Once.
2016-12-30 15:29:17 -05:00
Jeffrey Seyfried
e2ad3be178
Use #[prelude_import] in libcore.
2016-08-24 22:12:23 +00:00
Steven Allen
de91872a33
Add a FusedIterator trait.
...
This trait can be used to avoid the overhead of a fuse wrapper when an iterator
is already well-behaved.
Conforming to: RFC 1581
Closes : #35602
2016-08-18 12:16:29 -04:00
Ulrik Sverdrup
84654fa4bf
Split core::iter module implementation into parts
...
split iter.rs into a directory of (implementation private) modules.
+ mod Adaptor structs
- Private fields need to be available both for them and Iterator
+ iterator (Iterator trait)
+ traits (FromIterator, traits but Iterator itself)
+ range (range related)
+ sources (Repeat, Once, Empty)
2016-04-18 20:08:27 +02:00