Skip to content

Commit 5f88c23

Browse files
committed
add #[must_use] to functions of slice and its iterators.
1 parent dcdde01 commit 5f88c23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/core/tests/slice.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,31 +2344,31 @@ fn slice_rsplit_array_mut() {
23442344
fn slice_split_array_ref_out_of_bounds() {
23452345
let v = &[1, 2, 3, 4, 5, 6][..];
23462346

2347-
v.split_array_ref::<7>();
2347+
let _ = v.split_array_ref::<7>();
23482348
}
23492349

23502350
#[should_panic]
23512351
#[test]
23522352
fn slice_split_array_mut_out_of_bounds() {
23532353
let v = &mut [1, 2, 3, 4, 5, 6][..];
23542354

2355-
v.split_array_mut::<7>();
2355+
let _ = v.split_array_mut::<7>();
23562356
}
23572357

23582358
#[should_panic]
23592359
#[test]
23602360
fn slice_rsplit_array_ref_out_of_bounds() {
23612361
let v = &[1, 2, 3, 4, 5, 6][..];
23622362

2363-
v.rsplit_array_ref::<7>();
2363+
let _ = v.rsplit_array_ref::<7>();
23642364
}
23652365

23662366
#[should_panic]
23672367
#[test]
23682368
fn slice_rsplit_array_mut_out_of_bounds() {
23692369
let v = &mut [1, 2, 3, 4, 5, 6][..];
23702370

2371-
v.rsplit_array_mut::<7>();
2371+
let _ = v.rsplit_array_mut::<7>();
23722372
}
23732373

23742374
macro_rules! take_tests {

0 commit comments

Comments
 (0)