Commit 2fe9b51
authored
Unrolled build for #149664
Rollup merge of #149664 - Kivooeo:infallible-type-unreachable-code, r=davidtwco
attempt to fix unreachable code regression
For some reason it works, it checks function output type and suppress warning if type is uninhabited
~~This double negations in code breaks my mind actually~~
I'd love to revisit this part in future and try to find a proper solution maybe, but for now I feel like it's enough before release to fix the issue? I really wonder what team does think, especially `@cjgillot` and other people who are more confident in this part of compiler than I do
I tried a lot of things here, it's only approach that pass all tests included new regression one
fixes #149571
r? compilerFile tree
2 files changed
+30
-1
lines changed- compiler/rustc_mir_build/src/builder
- tests/ui/uninhabited
2 files changed
+30
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
842 | 861 | | |
843 | 862 | | |
844 | 863 | | |
| |||
849 | 868 | | |
850 | 869 | | |
851 | 870 | | |
852 | | - | |
| 871 | + | |
853 | 872 | | |
854 | 873 | | |
855 | 874 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments