2023-04-11 08:31:08 -05:00
|
|
|
error: manual slice size calculation
|
2024-10-02 10:51:52 -05:00
|
|
|
--> tests/ui/manual_slice_size_calculation.rs:17:13
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | let _ = s_i32.len() * size_of::<i32>(); // WARNING
|
2023-04-23 06:03:09 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-slice-size-calculation` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_slice_size_calculation)]`
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
error: manual slice size calculation
|
2024-10-02 10:51:52 -05:00
|
|
|
--> tests/ui/manual_slice_size_calculation.rs:18:13
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | let _ = size_of::<i32>() * s_i32.len(); // WARNING
|
2023-04-23 06:03:09 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
error: manual slice size calculation
|
2024-10-02 10:51:52 -05:00
|
|
|
--> tests/ui/manual_slice_size_calculation.rs:19:13
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | let _ = size_of::<i32>() * s_i32.len() * 5; // WARNING
|
2023-04-23 06:03:09 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
|
2023-04-11 08:31:08 -05:00
|
|
|
|
2024-10-02 10:51:52 -05:00
|
|
|
error: manual slice size calculation
|
|
|
|
--> tests/ui/manual_slice_size_calculation.rs:20:13
|
|
|
|
|
|
|
|
|
LL | let _ = size_of::<i32>() * s_i32_ref.len(); // WARNING
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(*s_i32_ref)`
|
|
|
|
|
2023-04-11 08:31:08 -05:00
|
|
|
error: manual slice size calculation
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/manual_slice_size_calculation.rs:21:13
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
2024-10-02 10:51:52 -05:00
|
|
|
LL | let _ = size_of::<i32>() * s_i32_ref_ref.len(); // WARNING
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(**s_i32_ref_ref)`
|
|
|
|
|
|
|
|
error: manual slice size calculation
|
|
|
|
--> tests/ui/manual_slice_size_calculation.rs:25:13
|
|
|
|
|
|
2023-04-11 08:31:08 -05:00
|
|
|
LL | let _ = len * size_of::<i32>(); // WARNING
|
2023-04-23 06:03:09 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
error: manual slice size calculation
|
2024-10-02 10:51:52 -05:00
|
|
|
--> tests/ui/manual_slice_size_calculation.rs:26:13
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | let _ = s_i32.len() * size; // WARNING
|
2023-04-23 06:03:09 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
error: manual slice size calculation
|
2024-10-02 10:51:52 -05:00
|
|
|
--> tests/ui/manual_slice_size_calculation.rs:27:13
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | let _ = len * size; // WARNING
|
2023-04-23 06:03:09 -05:00
|
|
|
| ^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
|
|
|
|
|
|
|
|
error: manual slice size calculation
|
2024-10-02 10:51:52 -05:00
|
|
|
--> tests/ui/manual_slice_size_calculation.rs:29:13
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
2023-04-23 06:03:09 -05:00
|
|
|
LL | let _ = external!(&[1u64][..]).len() * size_of::<u64>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(external!(&[1u64][..]))`
|
2023-04-11 08:31:08 -05:00
|
|
|
|
2024-10-02 10:51:52 -05:00
|
|
|
error: aborting due to 9 previous errors
|
2023-04-11 08:31:08 -05:00
|
|
|
|