Skip to content

Commit

Permalink
Update src/libcore/tests/slice.rs
Browse files Browse the repository at this point in the history
Co-Authored-By: Jack O'Connor <oconnor663@gmail.com>
  • Loading branch information
kennytm and oconnor663 authored Jun 3, 2019
1 parent aac9bc5 commit 427f1a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/tests/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ fn test_copy_within_panics_src_inverted() {
#[should_panic(expected = "attempted to index slice up to maximum usize")]
fn test_copy_within_panics_src_out_of_bounds() {
let mut bytes = *b"Hello, World!";
// 2 is greater than 1, so this range is invalid.
// an inclusive range ending at usize::max_value() would make src_end overflow
bytes.copy_within(usize::max_value()..=usize::max_value(), 0);
}

Expand Down

0 comments on commit 427f1a4

Please sign in to comment.