Commit f77a407
committed
Allow uninhabited types in generator interiors
Drop tracking in the generator interior type checking pass would count
all values in unreachable code as dropped (e.g. code after a call to a
function with an uninhabited return type), which would lead to those
values not being included in the witness type. This resulted in the type
checker being more precise than the corresponding sanity check in the
MIR transform.
This patch changes the check in the MIR code to match the results of
typeck by skipping uninhabited types.1 parent cc9f16b commit f77a407
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
752 | 758 | | |
753 | 759 | | |
754 | | - | |
| 760 | + | |
755 | 761 | | |
756 | 762 | | |
757 | 763 | | |
| |||
0 commit comments