2017-09-26 03:32:05 +02:00
|
|
|
error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
|
|
|
|
--> $DIR/mut_range_bound.rs:18:21
|
|
|
|
|
|
|
|
|
18 | for i in 0..m { m = 5; } // warning
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D mut-range-bound` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
|
|
|
|
--> $DIR/mut_range_bound.rs:23:22
|
|
|
|
|
|
|
|
|
23 | for i in m..10 { m *= 2; } // warning
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
|
|
|
|
--> $DIR/mut_range_bound.rs:29:21
|
|
|
|
|
|
|
|
|
29 | for i in m..n { m = 5; n = 7; } // warning (1 for each mutated bound)
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
|
|
|
|
--> $DIR/mut_range_bound.rs:29:28
|
|
|
|
|
|
|
|
|
29 | for i in m..n { m = 5; n = 7; } // warning (1 for each mutated bound)
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
|
|
|
|
--> $DIR/mut_range_bound.rs:40:22
|
|
|
|
|
|
|
|
|
40 | let n = &mut m; // warning
|
|
|
|
| ^
|
|
|
|
|
2018-01-16 17:06:27 +01:00
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|