mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 17:48:10 +00:00
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
error: attempt to mutate range bound within loop; note that the range of the loop is unchanged
|
|
--> $DIR/mut_range_bound.rs:28:21
|
|
|
|
|
28 | for i in 0..m { m = 5; } // warning
|
|
| ^^^^^
|
|
|
|
|
= note: `-D clippy::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:33:22
|
|
|
|
|
33 | 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:39:21
|
|
|
|
|
39 | 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:39:28
|
|
|
|
|
39 | 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:50:22
|
|
|
|
|
50 | let n = &mut m; // warning
|
|
| ^
|
|
|
|
error: aborting due to 5 previous errors
|
|
|