1
- error: found a count of bytes instead of a count of elements of T
1
+ error: found a count of bytes instead of a count of elements of `T`
2
2
--> $DIR/size_of_in_element_count.rs:18:68
3
3
|
4
4
LL | unsafe { copy_nonoverlapping::<u8>(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>()) };
@@ -7,183 +7,183 @@ LL | unsafe { copy_nonoverlapping::<u8>(x.as_ptr(), y.as_mut_ptr(), size_of:
7
7
= note: `-D clippy::size-of-in-element-count` implied by `-D warnings`
8
8
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
9
9
10
- error: found a count of bytes instead of a count of elements of T
10
+ error: found a count of bytes instead of a count of elements of `T`
11
11
--> $DIR/size_of_in_element_count.rs:19:62
12
12
|
13
13
LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0])) };
14
14
| ^^^^^^^^^^^^^^^^^^
15
15
|
16
16
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
17
17
18
- error: found a count of bytes instead of a count of elements of T
18
+ error: found a count of bytes instead of a count of elements of `T`
19
19
--> $DIR/size_of_in_element_count.rs:21:49
20
20
|
21
21
LL | unsafe { x.as_ptr().copy_to(y.as_mut_ptr(), size_of::<u8>()) };
22
22
| ^^^^^^^^^^^^^^^
23
23
|
24
24
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
25
25
26
- error: found a count of bytes instead of a count of elements of T
26
+ error: found a count of bytes instead of a count of elements of `T`
27
27
--> $DIR/size_of_in_element_count.rs:22:64
28
28
|
29
29
LL | unsafe { x.as_ptr().copy_to_nonoverlapping(y.as_mut_ptr(), size_of::<u8>()) };
30
30
| ^^^^^^^^^^^^^^^
31
31
|
32
32
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
33
33
34
- error: found a count of bytes instead of a count of elements of T
34
+ error: found a count of bytes instead of a count of elements of `T`
35
35
--> $DIR/size_of_in_element_count.rs:23:51
36
36
|
37
37
LL | unsafe { y.as_mut_ptr().copy_from(x.as_ptr(), size_of::<u8>()) };
38
38
| ^^^^^^^^^^^^^^^
39
39
|
40
40
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
41
41
42
- error: found a count of bytes instead of a count of elements of T
42
+ error: found a count of bytes instead of a count of elements of `T`
43
43
--> $DIR/size_of_in_element_count.rs:24:66
44
44
|
45
45
LL | unsafe { y.as_mut_ptr().copy_from_nonoverlapping(x.as_ptr(), size_of::<u8>()) };
46
46
| ^^^^^^^^^^^^^^^
47
47
|
48
48
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
49
49
50
- error: found a count of bytes instead of a count of elements of T
50
+ error: found a count of bytes instead of a count of elements of `T`
51
51
--> $DIR/size_of_in_element_count.rs:26:47
52
52
|
53
53
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>()) };
54
54
| ^^^^^^^^^^^^^^^
55
55
|
56
56
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
57
57
58
- error: found a count of bytes instead of a count of elements of T
58
+ error: found a count of bytes instead of a count of elements of `T`
59
59
--> $DIR/size_of_in_element_count.rs:27:47
60
60
|
61
61
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0])) };
62
62
| ^^^^^^^^^^^^^^^^^^
63
63
|
64
64
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
65
65
66
- error: found a count of bytes instead of a count of elements of T
66
+ error: found a count of bytes instead of a count of elements of `T`
67
67
--> $DIR/size_of_in_element_count.rs:29:46
68
68
|
69
69
LL | unsafe { y.as_mut_ptr().write_bytes(0u8, size_of::<u8>() * SIZE) };
70
70
| ^^^^^^^^^^^^^^^^^^^^^^
71
71
|
72
72
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
73
73
74
- error: found a count of bytes instead of a count of elements of T
74
+ error: found a count of bytes instead of a count of elements of `T`
75
75
--> $DIR/size_of_in_element_count.rs:30:47
76
76
|
77
77
LL | unsafe { write_bytes(y.as_mut_ptr(), 0u8, size_of::<u8>() * SIZE) };
78
78
| ^^^^^^^^^^^^^^^^^^^^^^
79
79
|
80
80
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
81
81
82
- error: found a count of bytes instead of a count of elements of T
82
+ error: found a count of bytes instead of a count of elements of `T`
83
83
--> $DIR/size_of_in_element_count.rs:32:66
84
84
|
85
85
LL | unsafe { swap_nonoverlapping(y.as_mut_ptr(), x.as_mut_ptr(), size_of::<u8>() * SIZE) };
86
86
| ^^^^^^^^^^^^^^^^^^^^^^
87
87
|
88
88
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
89
89
90
- error: found a count of bytes instead of a count of elements of T
90
+ error: found a count of bytes instead of a count of elements of `T`
91
91
--> $DIR/size_of_in_element_count.rs:34:46
92
92
|
93
93
LL | slice_from_raw_parts_mut(y.as_mut_ptr(), size_of::<u8>() * SIZE);
94
94
| ^^^^^^^^^^^^^^^^^^^^^^
95
95
|
96
96
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
97
97
98
- error: found a count of bytes instead of a count of elements of T
98
+ error: found a count of bytes instead of a count of elements of `T`
99
99
--> $DIR/size_of_in_element_count.rs:35:38
100
100
|
101
101
LL | slice_from_raw_parts(y.as_ptr(), size_of::<u8>() * SIZE);
102
102
| ^^^^^^^^^^^^^^^^^^^^^^
103
103
|
104
104
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
105
105
106
- error: found a count of bytes instead of a count of elements of T
106
+ error: found a count of bytes instead of a count of elements of `T`
107
107
--> $DIR/size_of_in_element_count.rs:37:49
108
108
|
109
109
LL | unsafe { from_raw_parts_mut(y.as_mut_ptr(), size_of::<u8>() * SIZE) };
110
110
| ^^^^^^^^^^^^^^^^^^^^^^
111
111
|
112
112
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
113
113
114
- error: found a count of bytes instead of a count of elements of T
114
+ error: found a count of bytes instead of a count of elements of `T`
115
115
--> $DIR/size_of_in_element_count.rs:38:41
116
116
|
117
117
LL | unsafe { from_raw_parts(y.as_ptr(), size_of::<u8>() * SIZE) };
118
118
| ^^^^^^^^^^^^^^^^^^^^^^
119
119
|
120
120
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
121
121
122
- error: found a count of bytes instead of a count of elements of T
122
+ error: found a count of bytes instead of a count of elements of `T`
123
123
--> $DIR/size_of_in_element_count.rs:40:33
124
124
|
125
125
LL | unsafe { y.as_mut_ptr().sub(size_of::<u8>()) };
126
126
| ^^^^^^^^^^^^^^^
127
127
|
128
128
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
129
129
130
- error: found a count of bytes instead of a count of elements of T
130
+ error: found a count of bytes instead of a count of elements of `T`
131
131
--> $DIR/size_of_in_element_count.rs:41:29
132
132
|
133
133
LL | y.as_ptr().wrapping_sub(size_of::<u8>());
134
134
| ^^^^^^^^^^^^^^^
135
135
|
136
136
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
137
137
138
- error: found a count of bytes instead of a count of elements of T
138
+ error: found a count of bytes instead of a count of elements of `T`
139
139
--> $DIR/size_of_in_element_count.rs:42:29
140
140
|
141
141
LL | unsafe { y.as_ptr().add(size_of::<u8>()) };
142
142
| ^^^^^^^^^^^^^^^
143
143
|
144
144
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
145
145
146
- error: found a count of bytes instead of a count of elements of T
146
+ error: found a count of bytes instead of a count of elements of `T`
147
147
--> $DIR/size_of_in_element_count.rs:43:33
148
148
|
149
149
LL | y.as_mut_ptr().wrapping_add(size_of::<u8>());
150
150
| ^^^^^^^^^^^^^^^
151
151
|
152
152
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
153
153
154
- error: found a count of bytes instead of a count of elements of T
154
+ error: found a count of bytes instead of a count of elements of `T`
155
155
--> $DIR/size_of_in_element_count.rs:44:32
156
156
|
157
157
LL | unsafe { y.as_ptr().offset(size_of::<u8>() as isize) };
158
158
| ^^^^^^^^^^^^^^^^^^^^^^^^
159
159
|
160
160
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
161
161
162
- error: found a count of bytes instead of a count of elements of T
162
+ error: found a count of bytes instead of a count of elements of `T`
163
163
--> $DIR/size_of_in_element_count.rs:45:36
164
164
|
165
165
LL | y.as_mut_ptr().wrapping_offset(size_of::<u8>() as isize);
166
166
| ^^^^^^^^^^^^^^^^^^^^^^^^
167
167
|
168
168
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
169
169
170
- error: found a count of bytes instead of a count of elements of T
170
+ error: found a count of bytes instead of a count of elements of `T`
171
171
--> $DIR/size_of_in_element_count.rs:48:62
172
172
|
173
173
LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * SIZE) };
174
174
| ^^^^^^^^^^^^^^^^^^^^^^
175
175
|
176
176
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
177
177
178
- error: found a count of bytes instead of a count of elements of T
178
+ error: found a count of bytes instead of a count of elements of `T`
179
179
--> $DIR/size_of_in_element_count.rs:51:62
180
180
|
181
181
LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), HALF_SIZE * size_of_val(&x[0]) * 2) };
182
182
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183
183
|
184
184
= help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
185
185
186
- error: found a count of bytes instead of a count of elements of T
186
+ error: found a count of bytes instead of a count of elements of `T`
187
187
--> $DIR/size_of_in_element_count.rs:54:47
188
188
|
189
189
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), DOUBLE_SIZE * size_of::<u8>() / 2) };
0 commit comments