about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorFrank King <frankking1729@gmail.com>2023-05-10 17:08:28 +0800
committerFrank King <frankking1729@gmail.com>2023-08-11 07:26:51 +0800
commit97c953f561e564a1b4fee2570dd2df704423d287 (patch)
tree6effcdef64f6c7f0151a056e3b00606933b03be9 /compiler/rustc_codegen_llvm/src
parentfaee636ebfff793ea9dcff17960a611b580e3cd5 (diff)
downloadrust-97c953f561e564a1b4fee2570dd2df704423d287.tar.gz
rust-97c953f561e564a1b4fee2570dd2df704423d287.zip
Add Iterator::map_windows
This is inherited from the old PR.

This method returns an iterator over mapped windows of the starting
iterator. Adding the more straight-forward `Iterator::windows` is not
easily possible right now as the items are stored in the iterator type,
meaning the `next` call would return references to `self`. This is not
allowed by the current `Iterator` trait design. This might change once
GATs have landed.

The idea has been brought up by @m-ou-se here:
https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Iterator.3A.3A.7Bpairwise.2C.20windows.7D/near/224587771

Co-authored-by: Lukas Kalbertodt <lukas.kalbertodt@gmail.com>
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions