diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-15 12:42:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-15 12:42:10 +0100 |
| commit | ae1ab8afa9bd93a07872aa6ac281ee62d72c49d6 (patch) | |
| tree | bc0b5188b4e3d9d4fafc2d8e8ad2604c1489d4bb /src/test/ui/thinlto | |
| parent | e8cfae4140ca237b277b3e5afac61f6504c54191 (diff) | |
| parent | 3a1f0131a63a32a82f22b1c4ae04f8177730588f (diff) | |
| download | rust-ae1ab8afa9bd93a07872aa6ac281ee62d72c49d6.tar.gz rust-ae1ab8afa9bd93a07872aa6ac281ee62d72c49d6.zip | |
Rollup merge of #57579 - stjepang:once-with, r=SimonSapin
Add core::iter::once_with() Functions `iter::once()` and `iter::repeat()` construct iterators from values. The latter has the lazy variant `iter::repeat_with()`, but the former doesn't. This PR therefore adds `iter::once_with()`. Another way to think of `iter::once_with()` is that it's a function that converts `FnOnce() -> T` into `Iterator<Item = T>`. If this seems like a reasonable addition, I'll open a tracking issue and update the `#[feature(...)]` attributes.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions
