This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 7eb025f
authored
Rollup merge of rust-lang#67546 - oli-obk:slice_pattern_ice, r=varkor
Fix ICE in mir interpretation
Indices from the end start at 1 so you can immediately subtract them from the length to get the index instead of having to do an additional `-1`. Kinda documented in https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/enum.ProjectionElem.html#variant.ConstantIndexFile tree
2 files changed
+11
-1
lines changed- src
- librustc_mir/interpret
- test/ui/consts
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
534 | 533 | | |
535 | 534 | | |
| 535 | + | |
536 | 536 | | |
537 | 537 | | |
| 538 | + | |
538 | 539 | | |
539 | 540 | | |
540 | 541 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments