Commit 5432d13
committed
Reuse existing
LLVM still has trouble re-using discriminants sometimes when rebuilding a two-variant enum, so when we have the correct variant already built, just use it.
That's simpler in LLVM *and* in MIR, so might as well: <https://rust.godbolt.org/z/KhdE8eToW>Somes in Option::(x)or
1 parent 579be69 commit 5432d13
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
1478 | | - | |
| 1478 | + | |
1479 | 1479 | | |
1480 | 1480 | | |
1481 | 1481 | | |
| |||
1500 | 1500 | | |
1501 | 1501 | | |
1502 | 1502 | | |
1503 | | - | |
| 1503 | + | |
1504 | 1504 | | |
1505 | 1505 | | |
1506 | 1506 | | |
| |||
1530 | 1530 | | |
1531 | 1531 | | |
1532 | 1532 | | |
1533 | | - | |
1534 | | - | |
| 1533 | + | |
| 1534 | + | |
1535 | 1535 | | |
1536 | 1536 | | |
1537 | 1537 | | |
| |||
0 commit comments