Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upstep_by + skip produce incorrect results #55985
Comments
This comment has been minimized.
This comment has been minimized.
|
Regression from 1.28.0 to 1.29.0. Introduced in #51601 |
This comment has been minimized.
This comment has been minimized.
m1el
commented
Nov 15, 2018
|
The problem is interaction between Test-case reduced to using fn main() {
let mut it = (0_usize..640).step_by(128);
it.nth(0);
assert_eq!(it.next(), Some(128));
} |
nagisa
added
I-nominated
T-libs
regression-from-stable-to-stable
C-bug
labels
Nov 17, 2018
This comment has been minimized.
This comment has been minimized.
|
From a cursory look, it seems to me that the problem is that In other words, if |
newpavlov commentedNov 15, 2018
•
edited
The following snippet demonstrates the problem:
It prints:
I expect second iterator to produce the same result as for the third one.