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

Catch reverse ranges in for loops #110

Closed
Manishearth opened this issue Jul 11, 2015 · 1 comment
Closed

Catch reverse ranges in for loops #110

Manishearth opened this issue Jul 11, 2015 · 1 comment

Comments

@Manishearth
Copy link
Member

fn main() {
   for i in (10..0) {
    println!("{}", i);
   } 
}

should be

fn main() {
   for i in (0..10).rev() {
    println!("{}", i);
   } 
}

rust-lang/rust#26975

Might be a bit tricky to handle due to desugaring.

@llogiq
Copy link
Contributor

llogiq commented Jul 12, 2015

This is a duplicate of #96.

@llogiq llogiq closed this as completed Jul 12, 2015
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

2 participants