Closed
Description
Repro: https://is.gd/nFIian (tried 2017-04-21)
#![feature(step_by)]
#![feature(inclusive_range_syntax)]
fn main() {
let i = (0...10).step_by(3);
assert!(i.size_hint().0 <= i.count());
}
Looks like the implementation is adding one to the Range (exclusive) lower bound, which is incorrect when the size of the base range isn't a multiple of the step.
Thoughts on whether it'd be a better fix to just not add one (correct, but a less-helpful hint) or to add one to end before calling Step::steps_between
(better hint, more math and more overflow cases)?