|
| 1 | +error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T |
| 2 | + --> $DIR/unsafe_sizeof_count_copies.rs:14:14 |
| 3 | + | |
| 4 | +LL | unsafe { copy_nonoverlapping::<u8>(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>()) }; |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: `-D clippy::unsafe-sizeof-count-copies` implied by `-D warnings` |
| 8 | + = 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 |
| 9 | + |
| 10 | +error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T |
| 11 | + --> $DIR/unsafe_sizeof_count_copies.rs:15:14 |
| 12 | + | |
| 13 | +LL | 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 for the count parameter, it already gets multiplied by the size of the pointed to type |
| 17 | + |
| 18 | +error: unsafe memory copying using a byte count (Multiplied by size_of::<T>) instead of a count of T |
| 19 | + --> $DIR/unsafe_sizeof_count_copies.rs:17:14 |
| 20 | + | |
| 21 | +LL | unsafe { copy(x.as_ptr(), 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 { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0])) }; |
| 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:21:14 |
| 36 | + | |
| 37 | +LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * SIZE) }; |
| 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:22:14 |
| 44 | + | |
| 45 | +LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0]) * SIZE) }; |
| 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:24:14 |
| 52 | + | |
| 53 | +LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * SIZE) }; |
| 54 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 55 | + | |
| 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 |
| 57 | + |
| 58 | +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 |
| 60 | + | |
| 61 | +LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0]) * SIZE) }; |
| 62 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 63 | + | |
| 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 |
| 65 | + |
| 66 | +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 |
| 68 | + | |
| 69 | +LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * HALF_SIZE * 2) }; |
| 70 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 71 | + | |
| 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 |
| 73 | + |
| 74 | +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 |
| 76 | + | |
| 77 | +LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), HALF_SIZE * size_of_val(&x[0]) * 2) }; |
| 78 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 79 | + | |
| 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 |
| 81 | + |
| 82 | +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 |
| 84 | + | |
| 85 | +LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * SIZE * HALF_SIZE) }; |
| 86 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 87 | + | |
| 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 |
| 89 | + |
| 90 | +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 |
| 92 | + | |
| 93 | +LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0]) * HALF_SIZE * 2) }; |
| 94 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 95 | + | |
| 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 |
| 97 | + |
| 98 | +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 |
| 100 | + | |
| 101 | +LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of::<u8>() * DOUBLE_SIZE / 2) }; |
| 102 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 103 | + | |
| 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 |
| 105 | + |
| 106 | +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 |
| 108 | + | |
| 109 | +LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), DOUBLE_SIZE / 2 * size_of_val(&x[0])) }; |
| 110 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 111 | + | |
| 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 |
| 113 | + |
| 114 | +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 |
| 116 | + | |
| 117 | +LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), DOUBLE_SIZE * size_of::<u8>() / 2) }; |
| 118 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 119 | + | |
| 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 |
| 121 | + |
| 122 | +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 |
| 124 | + | |
| 125 | +LL | unsafe { copy(x.as_ptr(), y.as_mut_ptr(), size_of_val(&x[0]) * DOUBLE_SIZE / 2) }; |
| 126 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 127 | + | |
| 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 |
| 129 | + |
| 130 | +error: aborting due to 16 previous errors |
| 131 | + |
0 commit comments