Uh oh!
There was an error while loading. Please reload this page.
Don't fuse Chain in its second iterator - #71404
Conversation
Only the "first" iterator is actually set `None` when exhausted, depending on whether you iterate forward or backward. This restores behavior similar to the former `ChainState`, where it would transition from `Both` to `Front`/`Back` and only continue from that side. However, if you mix directions, then this may still set both sides to `None`, totally fusing the iterator.
scottmcm
commented
Apr 22, 2020
I like this. Certainly seems justifiable to "don't write a @bors r+ I see this is marked as a beta regression; what's the process for contemplating that? |
bors
commented
Apr 22, 2020
📌 Commit eeb687f has been approved by |
cuviper
commented
Apr 22, 2020
Needs |
Mark-Simulacrum
commented
Apr 22, 2020
Cc @rust-lang/libs on backport approval |
dtolnay
commented
Apr 23, 2020
Looks okay to backport. Is this regressed in 1.43 or 1.44? #71375 only says it worked in 1.42 and is broken in nightly (1.44). |
cuviper
commented
Apr 23, 2020
Rollup of 7 pull requests Successful merges: - rust-lang#70633 (Confusing suggestion on incorrect closing `}`) - rust-lang#71404 (Don't fuse Chain in its second iterator) - rust-lang#71408 (Check code blocks tags) - rust-lang#71442 (Add a "by reference" adaptor for `AllocRef`) - rust-lang#71446 (Only use read_unaligned in transmute_copy if necessary) - rust-lang#71470 (Fix doc links) - rust-lang#71479 (add back Scalar::null_ptr) Failed merges: r? @ghost
Mark-Simulacrum
commented
Apr 30, 2020
Accepting for beta backport per #71404 (comment) |
…ulacrum [beta] backports This backport rollup includes the following: * [beta] Update cargo rust-lang#71967 * Backport 1.43.1 release notes to master rust-lang#71914 * Update the `cc` crate rust-lang#71882 * resolve: Relax fresh binding disambiguation slightly to fix regression rust-lang#71846 * Do not try to find binop method on RHS `TyErr` rust-lang#71810 * Quick and dirty fix of the unused_braces lint rust-lang#71517 * Update stdarch submodule rust-lang#71495 * normalize field projection ty to fix broken MIR issue rust-lang#71488 * Update openssl-src to 1.1.1g rust-lang#71430 * fix error code in E0751.md rust-lang#71426 * Don't fuse Chain in its second iterator rust-lang#71404 * Remove some `Vec` allocations to improve performance rust-lang#71268 * [CI] Use the latest Python available on Windows rust-lang#71995 It also switches the bootstrap compiler to 1.43.1.
Only the "first" iterator is actually set
Nonewhen exhausted,depending on whether you iterate forward or backward. This restores
behavior similar to the former
ChainState, where it would transitionfrom
BothtoFront/Backand only continue from that side.However, if you mix directions, then this may still set both sides to
None, totally fusing the iterator.Fixes#71375
r? @scottmcm