We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aac9bc5 commit 427f1a4Copy full SHA for 427f1a4
src/libcore/tests/slice.rs
@@ -1547,7 +1547,7 @@ fn test_copy_within_panics_src_inverted() {
1547
#[should_panic(expected = "attempted to index slice up to maximum usize")]
1548
fn test_copy_within_panics_src_out_of_bounds() {
1549
let mut bytes = *b"Hello, World!";
1550
- // 2 is greater than 1, so this range is invalid.
+ // an inclusive range ending at usize::max_value() would make src_end overflow
1551
bytes.copy_within(usize::max_value()..=usize::max_value(), 0);
1552
}
1553
0 commit comments