|
| 1 | +error: an inclusive range would be more readable |
| 2 | + --> $DIR/range_plus_minus_one.rs:12:14 |
| 3 | + | |
| 4 | +12 | for _ in 0..3+1 { } |
| 5 | + | ------ |
| 6 | + | | |
| 7 | + | help: use: `0..=3` |
| 8 | + | in this macro invocation |
| 9 | + | |
| 10 | + = note: `-D range-plus-one` implied by `-D warnings` |
| 11 | + |
| 12 | +error: an inclusive range would be more readable |
| 13 | + --> $DIR/range_plus_minus_one.rs:15:14 |
| 14 | + | |
| 15 | +15 | for _ in 0..1+5 { } |
| 16 | + | ------ |
| 17 | + | | |
| 18 | + | help: use: `0..=5` |
| 19 | + | in this macro invocation |
| 20 | + |
| 21 | +error: an inclusive range would be more readable |
| 22 | + --> $DIR/range_plus_minus_one.rs:18:14 |
| 23 | + | |
| 24 | +18 | for _ in 1..1+1 { } |
| 25 | + | ------ |
| 26 | + | | |
| 27 | + | help: use: `1..=1` |
| 28 | + | in this macro invocation |
| 29 | + |
| 30 | +error: an inclusive range would be more readable |
| 31 | + --> $DIR/range_plus_minus_one.rs:24:14 |
| 32 | + | |
| 33 | +24 | for _ in 0..(1+f()) { } |
| 34 | + | ---------- |
| 35 | + | | |
| 36 | + | help: use: `0..=f()` |
| 37 | + | in this macro invocation |
| 38 | + |
| 39 | +error: an exclusive range would be more readable |
| 40 | + --> $DIR/range_plus_minus_one.rs:28:13 |
| 41 | + | |
| 42 | +28 | let _ = ..=11-1; |
| 43 | + | ------- |
| 44 | + | | |
| 45 | + | help: use: `..11` |
| 46 | + | in this macro invocation |
| 47 | + | |
| 48 | + = note: `-D range-minus-one` implied by `-D warnings` |
| 49 | + |
| 50 | +error: an exclusive range would be more readable |
| 51 | + --> $DIR/range_plus_minus_one.rs:29:13 |
| 52 | + | |
| 53 | +29 | let _ = ..=(11-1); |
| 54 | + | --------- |
| 55 | + | | |
| 56 | + | help: use: `..11` |
| 57 | + | in this macro invocation |
| 58 | + |
| 59 | +error: an inclusive range would be more readable |
| 60 | + --> $DIR/range_plus_minus_one.rs:30:13 |
| 61 | + | |
| 62 | +30 | let _ = (f()+1)..(f()+1); |
| 63 | + | ---------------- |
| 64 | + | | |
| 65 | + | help: use: `(f()+1)..=f()` |
| 66 | + | in this macro invocation |
| 67 | + |
0 commit comments