@@ -57,14 +57,23 @@ LL | | }
57
57
error: it looks like you're manually copying between slices
58
58
--> $DIR/with_loop_counters.rs:41:5
59
59
|
60
+ LL | / for i in 0..dst.len() {
61
+ LL | | dst[i] = src[count];
62
+ LL | | count += 1;
63
+ LL | | }
64
+ | |_____^ help: try replacing the loop by: `dst.clone_from_slice(&src[2..(dst.len() + 2)]);`
65
+
66
+ error: it looks like you're manually copying between slices
67
+ --> $DIR/with_loop_counters.rs:47:5
68
+ |
60
69
LL | / for i in 3..10 {
61
70
LL | | dst[i] = src[count];
62
71
LL | | count += 1;
63
72
LL | | }
64
73
| |_____^ help: try replacing the loop by: `dst[3..10].clone_from_slice(&src[5..(10 + 5 - 3)]);`
65
74
66
75
error: it looks like you're manually copying between slices
67
- --> $DIR/with_loop_counters.rs:48 :5
76
+ --> $DIR/with_loop_counters.rs:54 :5
68
77
|
69
78
LL | / for i in 0..src.len() {
70
79
LL | | dst[count] = src[i];
@@ -81,7 +90,7 @@ LL | dst2[30..(src.len() + 30)].clone_from_slice(&src[..]);
81
90
|
82
91
83
92
error: it looks like you're manually copying between slices
84
- --> $DIR/with_loop_counters.rs:58 :5
93
+ --> $DIR/with_loop_counters.rs:64 :5
85
94
|
86
95
LL | / for i in 0..1 << 1 {
87
96
LL | | dst[count] = src[i + 2];
@@ -90,13 +99,13 @@ LL | | }
90
99
| |_____^ help: try replacing the loop by: `dst[(0 << 1)..((1 << 1) + (0 << 1))].clone_from_slice(&src[2..((1 << 1) + 2)]);`
91
100
92
101
error: it looks like you're manually copying between slices
93
- --> $DIR/with_loop_counters.rs:65 :5
102
+ --> $DIR/with_loop_counters.rs:71 :5
94
103
|
95
104
LL | / for i in 3..src.len() {
96
105
LL | | dst[i] = src[count];
97
106
LL | | count += 1
98
107
LL | | }
99
108
| |_____^ help: try replacing the loop by: `dst[3..src.len()].clone_from_slice(&src[..(src.len() - 3)]);`
100
109
101
- error: aborting due to 10 previous errors
110
+ error: aborting due to 11 previous errors
102
111
0 commit comments