mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
add #[must_use] to functions of slice and its iterators.
This commit is contained in:
parent
dcdde01aa3
commit
5f88c23c39
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user