diff --git a/library/core/tests/slice.rs b/library/core/tests/slice.rs index 7c4d2f266f9..798fcc3dfde 100644 --- a/library/core/tests/slice.rs +++ b/library/core/tests/slice.rs @@ -2344,7 +2344,7 @@ fn slice_rsplit_array_mut() { fn slice_split_array_ref_out_of_bounds() { let v = &[1, 2, 3, 4, 5, 6][..]; - v.split_array_ref::<7>(); + let _ = v.split_array_ref::<7>(); } #[should_panic] @@ -2352,7 +2352,7 @@ fn slice_split_array_ref_out_of_bounds() { fn slice_split_array_mut_out_of_bounds() { let v = &mut [1, 2, 3, 4, 5, 6][..]; - v.split_array_mut::<7>(); + let _ = v.split_array_mut::<7>(); } #[should_panic] @@ -2360,7 +2360,7 @@ fn slice_split_array_mut_out_of_bounds() { fn slice_rsplit_array_ref_out_of_bounds() { let v = &[1, 2, 3, 4, 5, 6][..]; - v.rsplit_array_ref::<7>(); + let _ = v.rsplit_array_ref::<7>(); } #[should_panic] @@ -2368,7 +2368,7 @@ fn slice_rsplit_array_ref_out_of_bounds() { fn slice_rsplit_array_mut_out_of_bounds() { let v = &mut [1, 2, 3, 4, 5, 6][..]; - v.rsplit_array_mut::<7>(); + let _ = v.rsplit_array_mut::<7>(); } macro_rules! take_tests {