11error: found a count of bytes instead of a count of elements of T
2- --> $DIR/size_of_in_element_count.rs:17 :68
2+ --> $DIR/size_of_in_element_count.rs:18 :68
33 |
44LL | unsafe { copy_nonoverlapping::<u8>(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>()) };
55 | ^^^^^^^^^^^^^^^
@@ -8,124 +8,188 @@ LL | unsafe { copy_nonoverlapping::<u8>(x.as_ptr(), y.as_mut_ptr(), size_of:
88 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
99
1010error: found a count of bytes instead of a count of elements of T
11- --> $DIR/size_of_in_element_count.rs:18 :62
11+ --> $DIR/size_of_in_element_count.rs:19 :62
1212 |
1313LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0])) };
1414 | ^^^^^^^^^^^^^^^^^^
1515 |
1616 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
1717
1818error: found a count of bytes instead of a count of elements of T
19- --> $DIR/size_of_in_element_count.rs:20 :49
19+ --> $DIR/size_of_in_element_count.rs:21 :49
2020 |
2121LL | unsafe { x.as_ptr().copy_to(y.as_mut_ptr(), size_of::<u8>()) };
2222 | ^^^^^^^^^^^^^^^
2323 |
2424 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
2525
2626error: found a count of bytes instead of a count of elements of T
27- --> $DIR/size_of_in_element_count.rs:21 :64
27+ --> $DIR/size_of_in_element_count.rs:22 :64
2828 |
2929LL | unsafe { x.as_ptr().copy_to_nonoverlapping(y.as_mut_ptr(), size_of::<u8>()) };
3030 | ^^^^^^^^^^^^^^^
3131 |
3232 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
3333
3434error: found a count of bytes instead of a count of elements of T
35- --> $DIR/size_of_in_element_count.rs:22 :51
35+ --> $DIR/size_of_in_element_count.rs:23 :51
3636 |
3737LL | unsafe { y.as_mut_ptr().copy_from(x.as_ptr(), size_of::<u8>()) };
3838 | ^^^^^^^^^^^^^^^
3939 |
4040 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
4141
4242error: found a count of bytes instead of a count of elements of T
43- --> $DIR/size_of_in_element_count.rs:23 :66
43+ --> $DIR/size_of_in_element_count.rs:24 :66
4444 |
4545LL | unsafe { y.as_mut_ptr().copy_from_nonoverlapping(x.as_ptr(), size_of::<u8>()) };
4646 | ^^^^^^^^^^^^^^^
4747 |
4848 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
4949
5050error: found a count of bytes instead of a count of elements of T
51- --> $DIR/size_of_in_element_count.rs:25 :47
51+ --> $DIR/size_of_in_element_count.rs:26 :47
5252 |
5353LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>()) };
5454 | ^^^^^^^^^^^^^^^
5555 |
5656 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
5757
5858error: found a count of bytes instead of a count of elements of T
59- --> $DIR/size_of_in_element_count.rs:26 :47
59+ --> $DIR/size_of_in_element_count.rs:27 :47
6060 |
6161LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0])) };
6262 | ^^^^^^^^^^^^^^^^^^
6363 |
6464 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
6565
6666error: found a count of bytes instead of a count of elements of T
67- --> $DIR/size_of_in_element_count.rs:28 :46
67+ --> $DIR/size_of_in_element_count.rs:29 :46
6868 |
6969LL | unsafe { y.as_mut_ptr().write_bytes(0u8, size_of::<u8>() * SIZE) };
7070 | ^^^^^^^^^^^^^^^^^^^^^^
7171 |
7272 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
7373
7474error: found a count of bytes instead of a count of elements of T
75- --> $DIR/size_of_in_element_count.rs:29 :47
75+ --> $DIR/size_of_in_element_count.rs:30 :47
7676 |
7777LL | unsafe { write_bytes(y.as_mut_ptr(), 0u8, size_of::<u8>() * SIZE) };
7878 | ^^^^^^^^^^^^^^^^^^^^^^
7979 |
8080 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
8181
8282error: found a count of bytes instead of a count of elements of T
83- --> $DIR/size_of_in_element_count.rs:31 :66
83+ --> $DIR/size_of_in_element_count.rs:32 :66
8484 |
8585LL | unsafe { swap_nonoverlapping(y.as_mut_ptr(), x.as_mut_ptr(), size_of::<u8>() * SIZE) };
8686 | ^^^^^^^^^^^^^^^^^^^^^^
8787 |
8888 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
8989
9090error: found a count of bytes instead of a count of elements of T
91- --> $DIR/size_of_in_element_count.rs:33 :46
91+ --> $DIR/size_of_in_element_count.rs:34 :46
9292 |
9393LL | slice_from_raw_parts_mut(y.as_mut_ptr(), size_of::<u8>() * SIZE);
9494 | ^^^^^^^^^^^^^^^^^^^^^^
9595 |
9696 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
9797
9898error: found a count of bytes instead of a count of elements of T
99- --> $DIR/size_of_in_element_count.rs:34 :38
99+ --> $DIR/size_of_in_element_count.rs:35 :38
100100 |
101101LL | slice_from_raw_parts(y.as_ptr(), size_of::<u8>() * SIZE);
102102 | ^^^^^^^^^^^^^^^^^^^^^^
103103 |
104104 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
105105
106106error: found a count of bytes instead of a count of elements of T
107- --> $DIR/size_of_in_element_count.rs:37:62
107+ --> $DIR/size_of_in_element_count.rs:37:49
108+ |
109+ LL | unsafe { from_raw_parts_mut(y.as_mut_ptr(), size_of::<u8>() * SIZE) };
110+ | ^^^^^^^^^^^^^^^^^^^^^^
111+ |
112+ = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
113+
114+ error: found a count of bytes instead of a count of elements of T
115+ --> $DIR/size_of_in_element_count.rs:38:41
116+ |
117+ LL | unsafe { from_raw_parts(y.as_ptr(), size_of::<u8>() * SIZE) };
118+ | ^^^^^^^^^^^^^^^^^^^^^^
119+ |
120+ = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
121+
122+ error: found a count of bytes instead of a count of elements of T
123+ --> $DIR/size_of_in_element_count.rs:40:33
124+ |
125+ LL | unsafe { y.as_mut_ptr().sub(size_of::<u8>()) };
126+ | ^^^^^^^^^^^^^^^
127+ |
128+ = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
129+
130+ error: found a count of bytes instead of a count of elements of T
131+ --> $DIR/size_of_in_element_count.rs:41:29
132+ |
133+ LL | y.as_ptr().wrapping_sub(size_of::<u8>());
134+ | ^^^^^^^^^^^^^^^
135+ |
136+ = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
137+
138+ error: found a count of bytes instead of a count of elements of T
139+ --> $DIR/size_of_in_element_count.rs:42:29
140+ |
141+ LL | unsafe { y.as_ptr().add(size_of::<u8>()) };
142+ | ^^^^^^^^^^^^^^^
143+ |
144+ = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
145+
146+ error: found a count of bytes instead of a count of elements of T
147+ --> $DIR/size_of_in_element_count.rs:43:33
148+ |
149+ LL | y.as_mut_ptr().wrapping_add(size_of::<u8>());
150+ | ^^^^^^^^^^^^^^^
151+ |
152+ = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
153+
154+ error: found a count of bytes instead of a count of elements of T
155+ --> $DIR/size_of_in_element_count.rs:44:32
156+ |
157+ LL | unsafe { y.as_ptr().offset(size_of::<u8>() as isize) };
158+ | ^^^^^^^^^^^^^^^^^^^^^^^^
159+ |
160+ = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
161+
162+ error: found a count of bytes instead of a count of elements of T
163+ --> $DIR/size_of_in_element_count.rs:45:36
164+ |
165+ LL | y.as_mut_ptr().wrapping_offset(size_of::<u8>() as isize);
166+ | ^^^^^^^^^^^^^^^^^^^^^^^^
167+ |
168+ = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
169+
170+ error: found a count of bytes instead of a count of elements of T
171+ --> $DIR/size_of_in_element_count.rs:48:62
108172 |
109173LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * SIZE) };
110174 | ^^^^^^^^^^^^^^^^^^^^^^
111175 |
112176 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
113177
114178error: found a count of bytes instead of a count of elements of T
115- --> $DIR/size_of_in_element_count.rs:40 :62
179+ --> $DIR/size_of_in_element_count.rs:51 :62
116180 |
117181LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), HALF_SIZE * size_of_val(&x[0]) * 2) };
118182 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119183 |
120184 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
121185
122186error: found a count of bytes instead of a count of elements of T
123- --> $DIR/size_of_in_element_count.rs:43 :47
187+ --> $DIR/size_of_in_element_count.rs:54 :47
124188 |
125189LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), DOUBLE_SIZE * size_of::<u8>() / 2) };
126190 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127191 |
128192 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
129193
130- error: aborting due to 16 previous errors
194+ error: aborting due to 24 previous errors
131195
0 commit comments