blob: 38e43d5b4e06ed9d15f1bc84f1a163128ea4af72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
error: manually filling a slice
--> tests/ui/manual_slice_fill.rs:25:5
|
LL | / for i in 0..some_slice.len() {
LL | |
LL | | some_slice[i] = 0;
LL | | }
| |_____^ help: try: `some_slice.fill(0);`
|
= note: `-D clippy::manual-slice-fill` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_slice_fill)]`
error: manually filling a slice
--> tests/ui/manual_slice_fill.rs:31:5
|
LL | / for i in 0..some_slice.len() {
LL | |
LL | | some_slice[i] = x;
LL | | }
| |_____^ help: try: `some_slice.fill(x);`
error: manually filling a slice
--> tests/ui/manual_slice_fill.rs:36:5
|
LL | / for i in &mut some_slice {
LL | |
LL | | *i = 0;
LL | | }
| |_____^ help: try: `some_slice.fill(0);`
error: manually filling a slice
--> tests/ui/manual_slice_fill.rs:43:5
|
LL | / for i in 0..some_slice.len() {
LL | |
LL | | some_slice[i] = 0;
LL | | // foo
LL | | }
| |_____^ help: try: `some_slice.fill(0);`
error: aborting due to 4 previous errors
|