Commit e95b48b
authored
Rollup merge of #133702 - RalfJung:single-variant, r=oli-obk
Variants::Single: do not use invalid VariantIdx for uninhabited enums
~~Stacked on top of rust-lang/rust#133681, only the last commit is new.~~
Currently, `Variants::Single` for an empty enum contains a `VariantIdx` of 0; looking that up in the enum variant list will ICE. That's quite confusing. So let's fix that by adding a new `Variants::Empty` case for types that have 0 variants.
try-job: i686-msvc2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
816 | | - | |
| 816 | + | |
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
| |||
1638 | 1638 | | |
1639 | 1639 | | |
1640 | 1640 | | |
| 1641 | + | |
1641 | 1642 | | |
1642 | 1643 | | |
1643 | 1644 | | |
| |||
1800 | 1801 | | |
1801 | 1802 | | |
1802 | 1803 | | |
1803 | | - | |
| 1804 | + | |
1804 | 1805 | | |
1805 | 1806 | | |
1806 | 1807 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
| |||
0 commit comments