Skip to content

Commit fc2e278

Browse files
authored
Rollup merge of #145137 - Kmeakin:km/optimize-slice-index-panicking, r=jhpratt
Consolidate panicking functions in `slice/index.rs` Consolidate all the panicking functions in `slice/index.rs` to use a single `slice_index_fail` function, similar to how it is done in `str/traits.rs`. Split off from rust-lang/rust#145024
2 parents f03972b + 762895d commit fc2e278

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/panic/oob_subslice.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
thread 'main' ($TID) panicked at tests/panic/oob_subslice.rs:LL:CC:
3-
range end index 5 out of range for slice of length 4
3+
range end index 4 out of range for slice of length 4
44
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
55
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect

0 commit comments

Comments
 (0)