Skip to content

Commit 427f1a4

Browse files
kennytmoconnor663
andauthored
Update src/libcore/tests/slice.rs
Co-Authored-By: Jack O'Connor <[email protected]>
1 parent aac9bc5 commit 427f1a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/tests/slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ fn test_copy_within_panics_src_inverted() {
15471547
#[should_panic(expected = "attempted to index slice up to maximum usize")]
15481548
fn test_copy_within_panics_src_out_of_bounds() {
15491549
let mut bytes = *b"Hello, World!";
1550-
// 2 is greater than 1, so this range is invalid.
1550+
// an inclusive range ending at usize::max_value() would make src_end overflow
15511551
bytes.copy_within(usize::max_value()..=usize::max_value(), 0);
15521552
}
15531553

0 commit comments

Comments
 (0)