]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/size_of_in_element_count/expressions.stderr
size_of_in_element_count: Disable lint on division by byte-size
[rust.git] / tests / ui / size_of_in_element_count / expressions.stderr
index 47b98e9d9474028f24eff0b43fb890c7715f3657..0f0dff57f51bd4730a7f39e2553635b80418f88c 100644 (file)
@@ -23,5 +23,13 @@ LL |     unsafe { copy(x.as_ptr(), y.as_mut_ptr(), DOUBLE_SIZE * size_of::<u8>()
    |
    = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
 
-error: aborting due to 3 previous errors
+error: found a count of bytes instead of a count of elements of `T`
+  --> $DIR/expressions.rs:30:47
+   |
+LL |     unsafe { copy(x.as_ptr(), y.as_mut_ptr(), DOUBLE_SIZE / (2 / size_of::<u8>())) };
+   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type
+
+error: aborting due to 4 previous errors