]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/size_of_in_element_count/functions.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / size_of_in_element_count / functions.stderr
CommitLineData
f20569fa
XL
1error: found a count of bytes instead of a count of elements of `T`
2 --> $DIR/functions.rs:18:68
3 |
4LL | unsafe { copy_nonoverlapping::<u8>(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>()) };
5 | ^^^^^^^^^^^^^^^
6 |
7 = note: `-D clippy::size-of-in-element-count` implied by `-D warnings`
8 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
9
10error: found a count of bytes instead of a count of elements of `T`
11 --> $DIR/functions.rs:19:62
12 |
13LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0])) };
14 | ^^^^^^^^^^^^^^^^^^
15 |
16 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
17
18error: found a count of bytes instead of a count of elements of `T`
19 --> $DIR/functions.rs:21:49
20 |
21LL | 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, it already gets multiplied by the size of the type
25
26error: found a count of bytes instead of a count of elements of `T`
27 --> $DIR/functions.rs:22:64
28 |
29LL | 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, it already gets multiplied by the size of the type
33
34error: found a count of bytes instead of a count of elements of `T`
35 --> $DIR/functions.rs:23:51
36 |
37LL | 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, it already gets multiplied by the size of the type
41
42error: found a count of bytes instead of a count of elements of `T`
43 --> $DIR/functions.rs:24:66
44 |
45LL | 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, it already gets multiplied by the size of the type
49
50error: found a count of bytes instead of a count of elements of `T`
51 --> $DIR/functions.rs:26:47
52 |
53LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>()) };
54 | ^^^^^^^^^^^^^^^
55 |
56 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
57
58error: found a count of bytes instead of a count of elements of `T`
59 --> $DIR/functions.rs:27:47
60 |
61LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0])) };
62 | ^^^^^^^^^^^^^^^^^^
63 |
64 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
65
66error: found a count of bytes instead of a count of elements of `T`
67 --> $DIR/functions.rs:29:46
68 |
69LL | unsafe { y.as_mut_ptr().write_bytes(0u8, size_of::<u8>() * SIZE) };
70 | ^^^^^^^^^^^^^^^^^^^^^^
71 |
72 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
73
74error: found a count of bytes instead of a count of elements of `T`
75 --> $DIR/functions.rs:30:47
76 |
77LL | unsafe { write_bytes(y.as_mut_ptr(), 0u8, size_of::<u8>() * SIZE) };
78 | ^^^^^^^^^^^^^^^^^^^^^^
79 |
80 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
81
82error: found a count of bytes instead of a count of elements of `T`
83 --> $DIR/functions.rs:32:66
84 |
85LL | unsafe { swap_nonoverlapping(y.as_mut_ptr(), x.as_mut_ptr(), size_of::<u8>() * SIZE) };
86 | ^^^^^^^^^^^^^^^^^^^^^^
87 |
88 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
89
90error: found a count of bytes instead of a count of elements of `T`
91 --> $DIR/functions.rs:34:46
92 |
93LL | slice_from_raw_parts_mut(y.as_mut_ptr(), size_of::<u8>() * SIZE);
94 | ^^^^^^^^^^^^^^^^^^^^^^
95 |
96 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
97
98error: found a count of bytes instead of a count of elements of `T`
99 --> $DIR/functions.rs:35:38
100 |
101LL | slice_from_raw_parts(y.as_ptr(), size_of::<u8>() * SIZE);
102 | ^^^^^^^^^^^^^^^^^^^^^^
103 |
104 = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
105
106error: found a count of bytes instead of a count of elements of `T`
107 --> $DIR/functions.rs:37:49
108 |
109LL | 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
114error: found a count of bytes instead of a count of elements of `T`
115 --> $DIR/functions.rs:38:41
116 |
117LL | 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
122error: found a count of bytes instead of a count of elements of `T`
123 --> $DIR/functions.rs:40:33
124 |
125LL | 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
130error: found a count of bytes instead of a count of elements of `T`
131 --> $DIR/functions.rs:41:29
132 |
133LL | 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
138error: found a count of bytes instead of a count of elements of `T`
139 --> $DIR/functions.rs:42:29
140 |
141LL | 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
146error: found a count of bytes instead of a count of elements of `T`
147 --> $DIR/functions.rs:43:33
148 |
149LL | 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
154error: found a count of bytes instead of a count of elements of `T`
155 --> $DIR/functions.rs:44:32
156 |
157LL | 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
162error: found a count of bytes instead of a count of elements of `T`
163 --> $DIR/functions.rs:45:36
164 |
165LL | 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
170error: aborting due to 21 previous errors
171