@@ -2,50 +2,39 @@ error: manual slice size calculation
22 --> $DIR/manual_slice_size_calculation.rs:11:13
33 |
44LL | let _ = s_i32.len() * size_of::<i32>(); // WARNING
5- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
66 |
7- = help: consider using std::mem::size_of_val instead
87 = note: `-D clippy::manual-slice-size-calculation` implied by `-D warnings`
98
109error: manual slice size calculation
1110 --> $DIR/manual_slice_size_calculation.rs:12:13
1211 |
1312LL | let _ = size_of::<i32>() * s_i32.len(); // WARNING
14- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15- |
16- = help: consider using std::mem::size_of_val instead
13+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
1714
1815error: manual slice size calculation
1916 --> $DIR/manual_slice_size_calculation.rs:13:13
2017 |
2118LL | let _ = size_of::<i32>() * s_i32.len() * 5; // WARNING
22- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23- |
24- = help: consider using std::mem::size_of_val instead
19+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
2520
2621error: manual slice size calculation
2722 --> $DIR/manual_slice_size_calculation.rs:17:13
2823 |
2924LL | let _ = len * size_of::<i32>(); // WARNING
30- | ^^^^^^^^^^^^^^^^^^^^^^
31- |
32- = help: consider using std::mem::size_of_val instead
25+ | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
3326
3427error: manual slice size calculation
3528 --> $DIR/manual_slice_size_calculation.rs:18:13
3629 |
3730LL | let _ = s_i32.len() * size; // WARNING
38- | ^^^^^^^^^^^^^^^^^^
39- |
40- = help: consider using std::mem::size_of_val instead
31+ | ^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
4132
4233error: manual slice size calculation
4334 --> $DIR/manual_slice_size_calculation.rs:19:13
4435 |
4536LL | let _ = len * size; // WARNING
46- | ^^^^^^^^^^
47- |
48- = help: consider using std::mem::size_of_val instead
37+ | ^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
4938
5039error: aborting due to 6 previous errors
5140
0 commit comments