I think it'd have to be something like:

```
for_range!(0 <= x < size, {
})
```

Because the fragment `range(x, y) |x|` you're trying to replace is not an _expression_.


Niko

March 6, 2013 9:50 AM
Hi,
 
Would it be possible to leverage the macro system, so that a range can be expressed using an intuitive syntax ?
 
Something like :
 
for range!(0 <= x < size) {
    io::print(x);
}
 
or 

 

 

for range!(10 > v >= 0) {
    io::print(v);
}

 

 

 

 

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to