-error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
- --> $DIR/mut_range_bound.rs:28:21
+error: attempt to mutate range bound within loop
+ --> $DIR/mut_range_bound.rs:8:9
|
-28 | for i in 0..m { m = 5; } // warning
- | ^^^^^
+LL | m = 5;
+ | ^
|
= note: `-D clippy::mut-range-bound` implied by `-D warnings`
+ = note: the range of the loop is unchanged
-error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
- --> $DIR/mut_range_bound.rs:33:22
+error: attempt to mutate range bound within loop
+ --> $DIR/mut_range_bound.rs:15:9
|
-33 | for i in m..10 { m *= 2; } // warning
- | ^^^^^^
+LL | m *= 2;
+ | ^
+ |
+ = note: the range of the loop is unchanged
-error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
- --> $DIR/mut_range_bound.rs:39:21
+error: attempt to mutate range bound within loop
+ --> $DIR/mut_range_bound.rs:23:9
+ |
+LL | m = 5;
+ | ^
|
-39 | for i in m..n { m = 5; n = 7; } // warning (1 for each mutated bound)
- | ^^^^^
+ = note: the range of the loop is unchanged
-error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
- --> $DIR/mut_range_bound.rs:39:28
+error: attempt to mutate range bound within loop
+ --> $DIR/mut_range_bound.rs:24:9
+ |
+LL | n = 7;
+ | ^
|
-39 | for i in m..n { m = 5; n = 7; } // warning (1 for each mutated bound)
- | ^^^^^
+ = note: the range of the loop is unchanged
-error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
- --> $DIR/mut_range_bound.rs:50:22
+error: attempt to mutate range bound within loop
+ --> $DIR/mut_range_bound.rs:38:22
|
-50 | let n = &mut m; // warning
+LL | let n = &mut m; // warning
| ^
+ |
+ = note: the range of the loop is unchanged
+
+error: attempt to mutate range bound within loop
+ --> $DIR/mut_range_bound.rs:70:9
+ |
+LL | m = 2; // warning because it is not immediately followed by break
+ | ^
+ |
+ = note: the range of the loop is unchanged
+
+error: attempt to mutate range bound within loop
+ --> $DIR/mut_range_bound.rs:79:13
+ |
+LL | n = 1; // FIXME: warning because is is not immediately followed by break
+ | ^
+ |
+ = note: the range of the loop is unchanged
-error: aborting due to 5 previous errors
+error: aborting due to 7 previous errors