rust/tests/ui/manual_slice_size_calculation.stderr

41 lines
1.5 KiB
Plaintext
Raw Normal View History

2023-03-19 04:29:32 -05:00
error: manual slice size calculation
2023-04-17 13:43:16 -05:00
--> $DIR/manual_slice_size_calculation.rs:12:13
2023-03-19 04:29:32 -05:00
|
LL | let _ = s_i32.len() * size_of::<i32>(); // WARNING
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
2023-03-19 04:29:32 -05:00
|
= note: `-D clippy::manual-slice-size-calculation` implied by `-D warnings`
error: manual slice size calculation
2023-04-17 13:43:16 -05:00
--> $DIR/manual_slice_size_calculation.rs:13:13
2023-03-19 04:29:32 -05:00
|
LL | let _ = size_of::<i32>() * s_i32.len(); // WARNING
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
2023-03-19 04:29:32 -05:00
error: manual slice size calculation
2023-04-17 13:43:16 -05:00
--> $DIR/manual_slice_size_calculation.rs:14:13
2023-03-19 04:29:32 -05:00
|
LL | let _ = size_of::<i32>() * s_i32.len() * 5; // WARNING
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
2023-03-19 04:29:32 -05:00
error: manual slice size calculation
2023-04-17 13:43:16 -05:00
--> $DIR/manual_slice_size_calculation.rs:18:13
|
LL | let _ = len * size_of::<i32>(); // WARNING
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
error: manual slice size calculation
2023-04-17 13:43:16 -05:00
--> $DIR/manual_slice_size_calculation.rs:19:13
|
LL | let _ = s_i32.len() * size; // WARNING
| ^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
error: manual slice size calculation
2023-04-17 13:43:16 -05:00
--> $DIR/manual_slice_size_calculation.rs:20:13
|
LL | let _ = len * size; // WARNING
| ^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
error: aborting due to 6 previous errors
2023-03-19 04:29:32 -05:00