diff options
| author | kennytm <kennytm@gmail.com> | 2019-06-04 00:27:28 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-04 00:27:28 +0800 |
| commit | 427f1a49f677395fbc4415f2917207fb7e4bc061 (patch) | |
| tree | 1f2aaa8e9fb83d35a98172157aac962da00048ee /src/libcore/tests | |
| parent | aac9bc5ffac941b5880ad269076169b752a1c7e9 (diff) | |
| download | rust-427f1a49f677395fbc4415f2917207fb7e4bc061.tar.gz rust-427f1a49f677395fbc4415f2917207fb7e4bc061.zip | |
Update src/libcore/tests/slice.rs
Co-Authored-By: Jack O'Connor <oconnor663@gmail.com>
Diffstat (limited to 'src/libcore/tests')
| -rw-r--r-- | src/libcore/tests/slice.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/tests/slice.rs b/src/libcore/tests/slice.rs index 40175729592..eaa799fa96e 100644 --- a/src/libcore/tests/slice.rs +++ b/src/libcore/tests/slice.rs @@ -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); } |
