@@ -18,114 +18,146 @@ LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x
18
18
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
19
19
--> $DIR/unsafe_sizeof_count_copies.rs:17:14
20
20
|
21
+ LL | unsafe { x.as_ptr().copy_to(y.as_mut_ptr(), size_of::<u8>()) };
22
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
+ |
24
+ = help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
25
+
26
+ error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
27
+ --> $DIR/unsafe_sizeof_count_copies.rs:18:14
28
+ |
29
+ LL | unsafe { x.as_ptr().copy_to_nonoverlapping(y.as_mut_ptr(), size_of::<u8>()) };
30
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
+ |
32
+ = help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
33
+
34
+ error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
35
+ --> $DIR/unsafe_sizeof_count_copies.rs:19:14
36
+ |
37
+ LL | unsafe { y.as_mut_ptr().copy_from(x.as_ptr(), size_of::<u8>()) };
38
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
+ |
40
+ = help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
41
+
42
+ error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
43
+ --> $DIR/unsafe_sizeof_count_copies.rs:20:14
44
+ |
45
+ LL | unsafe { y.as_mut_ptr().copy_from_nonoverlapping(x.as_ptr(), size_of::<u8>()) };
46
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47
+ |
48
+ = help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
49
+
50
+ error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
51
+ --> $DIR/unsafe_sizeof_count_copies.rs:22:14
52
+ |
21
53
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>()) };
22
54
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
55
|
24
56
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
25
57
26
58
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
27
- --> $DIR/unsafe_sizeof_count_copies.rs:18 :14
59
+ --> $DIR/unsafe_sizeof_count_copies.rs:23 :14
28
60
|
29
61
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0])) };
30
62
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
63
|
32
64
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
33
65
34
66
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
35
- --> $DIR/unsafe_sizeof_count_copies.rs:21 :14
67
+ --> $DIR/unsafe_sizeof_count_copies.rs:26 :14
36
68
|
37
69
LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * SIZE) };
38
70
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
71
|
40
72
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
41
73
42
74
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
43
- --> $DIR/unsafe_sizeof_count_copies.rs:22 :14
75
+ --> $DIR/unsafe_sizeof_count_copies.rs:27 :14
44
76
|
45
77
LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0]) * SIZE) };
46
78
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47
79
|
48
80
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
49
81
50
82
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
51
- --> $DIR/unsafe_sizeof_count_copies.rs:24 :14
83
+ --> $DIR/unsafe_sizeof_count_copies.rs:29 :14
52
84
|
53
85
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * SIZE) };
54
86
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
87
|
56
88
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
57
89
58
90
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
59
- --> $DIR/unsafe_sizeof_count_copies.rs:25 :14
91
+ --> $DIR/unsafe_sizeof_count_copies.rs:30 :14
60
92
|
61
93
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0]) * SIZE) };
62
94
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63
95
|
64
96
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
65
97
66
98
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
67
- --> $DIR/unsafe_sizeof_count_copies.rs:28 :14
99
+ --> $DIR/unsafe_sizeof_count_copies.rs:33 :14
68
100
|
69
101
LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * HALF_SIZE * 2) };
70
102
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71
103
|
72
104
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
73
105
74
106
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
75
- --> $DIR/unsafe_sizeof_count_copies.rs:29 :14
107
+ --> $DIR/unsafe_sizeof_count_copies.rs:34 :14
76
108
|
77
109
LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), HALF_SIZE * size_of_val(&x[0]) * 2) };
78
110
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79
111
|
80
112
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
81
113
82
114
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
83
- --> $DIR/unsafe_sizeof_count_copies.rs:31 :14
115
+ --> $DIR/unsafe_sizeof_count_copies.rs:36 :14
84
116
|
85
117
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * SIZE * HALF_SIZE) };
86
118
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
119
|
88
120
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
89
121
90
122
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
91
- --> $DIR/unsafe_sizeof_count_copies.rs:32 :14
123
+ --> $DIR/unsafe_sizeof_count_copies.rs:37 :14
92
124
|
93
125
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0]) * HALF_SIZE * 2) };
94
126
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95
127
|
96
128
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
97
129
98
130
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
99
- --> $DIR/unsafe_sizeof_count_copies.rs:35 :14
131
+ --> $DIR/unsafe_sizeof_count_copies.rs:40 :14
100
132
|
101
133
LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * DOUBLE_SIZE / 2) };
102
134
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103
135
|
104
136
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
105
137
106
138
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
107
- --> $DIR/unsafe_sizeof_count_copies.rs:36 :14
139
+ --> $DIR/unsafe_sizeof_count_copies.rs:41 :14
108
140
|
109
141
LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), DOUBLE_SIZE / 2 * size_of_val(&x[0])) };
110
142
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111
143
|
112
144
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
113
145
114
146
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
115
- --> $DIR/unsafe_sizeof_count_copies.rs:38 :14
147
+ --> $DIR/unsafe_sizeof_count_copies.rs:43 :14
116
148
|
117
149
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), DOUBLE_SIZE * size_of::<u8>() / 2) };
118
150
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119
151
|
120
152
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
121
153
122
154
error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T
123
- --> $DIR/unsafe_sizeof_count_copies.rs:39 :14
155
+ --> $DIR/unsafe_sizeof_count_copies.rs:44 :14
124
156
|
125
157
LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0]) * DOUBLE_SIZE / 2) };
126
158
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127
159
|
128
160
= help: use a count of elements instead of a count of bytes for the count parameter, it already gets multiplied by the size of the pointed to type
129
161
130
- error: aborting due to 16 previous errors
162
+ error: aborting due to 20 previous errors
131
163
0 commit comments