rust/tests/ui/mut_range_bound.stderr

35 lines
1.2 KiB
Plaintext
Raw Normal View History

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