Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeFrom loops endlessly #25707

Closed
anmej opened this issue May 22, 2015 · 3 comments
Closed

RangeFrom loops endlessly #25707

anmej opened this issue May 22, 2015 · 3 comments

Comments

@anmej
Copy link

anmej commented May 22, 2015

for i in (254u8..) { println!("{:?}", i) } will not stop at 255, but instead loops back to 0 and continues from there.

Update: This is the correct behavior, apparently.

@Kimundi
Copy link
Member

Kimundi commented May 22, 2015

#20249 indicates this is intentional

@anmej anmej closed this as completed May 22, 2015
@Gankra
Copy link
Contributor

Gankra commented May 22, 2015

Note that it should panic in debug builds

@Gankra
Copy link
Contributor

Gankra commented May 22, 2015

See #25696 for assertions that this is not desirable behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants