This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 58192ec
authored
Unrolled build for rust-lang#130764
Rollup merge of rust-lang#130764 - compiler-errors:inherent, r=estebank
Separate collection of crate-local inherent impls from error tracking
rust-lang#119895 changed the return type of the `crate_inherent_impls` query from `CrateInherentImpls` to `Result<CrateInherentImpls, ErrorGuaranteed>` to avoid needing to use the non-parallel-friendly `track_errors()` to track if an error was reporting from within the query... This was mostly fine until rust-lang#121113, which stopped halting compilation when we hit an `Err(ErrorGuaranteed)` in the `crate_inherent_impls` query.
Thus we proceed onwards to typeck, and since a return type of `Result<CrateInherentImpls, ErrorGuaranteed>` means that the query can *either* return one of "the list inherent impls" or "error has been reported", later on when we want to assemble method or associated item candidates for inherent impls, we were just treating any `Err(ErrorGuaranteed)` return value as if Rust had no inherent impls defined anywhere at all! This leads to basically every inherent method call failing with an error, lol, which was reported in rust-lang#127798.
This PR changes the `crate_inherent_impls` query to return `(CrateInherentImpls, Result<(), ErrorGuaranteed>)`, i.e. returning the inherent impls collected *and* whether an error was reported in the query itself. It firewalls the latter part of that query into a new `crate_inherent_impls_validity_check` just for the `ensure()` call.
This fixes rust-lang#127798.File tree
31 files changed
+136
-144
lines changed- compiler
- rustc_hir_analysis/src
- coherence
- hir_ty_lowering
- rustc_hir_typeck/src
- method
- rustc_metadata/src/rmeta
- decoder
- rustc_middle/src
- query
- ty
- rustc_monomorphize/src
- rustc_resolve/src/late
- src
- librustdoc
- clean
- passes
- tools/clippy
- clippy_lints/src
- methods
- clippy_utils/src
- tests/ui
- const-generics
- impl-trait
- traits
31 files changed
+136
-144
lines changedLines changed: 18 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
36 | 37 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | | - | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | | - | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
| 180 | + | |
182 | 181 | | |
183 | 182 | | |
184 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
128 | 131 | | |
129 | 132 | | |
130 | 133 | | |
| |||
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| 139 | + | |
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
1031 | | - | |
| 1031 | + | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1272 | 1272 | | |
1273 | 1273 | | |
1274 | 1274 | | |
1275 | | - | |
| 1275 | + | |
1276 | 1276 | | |
1277 | 1277 | | |
1278 | 1278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2126 | 2126 | | |
2127 | 2127 | | |
2128 | 2128 | | |
2129 | | - | |
2130 | 2129 | | |
2131 | 2130 | | |
2132 | 2131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
731 | | - | |
| 731 | + | |
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
737 | | - | |
| 737 | + | |
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
683 | | - | |
684 | 683 | | |
685 | 684 | | |
686 | 685 | | |
| |||
1438 | 1437 | | |
1439 | 1438 | | |
1440 | 1439 | | |
1441 | | - | |
1442 | 1440 | | |
1443 | 1441 | | |
1444 | 1442 | | |
| |||
1900 | 1898 | | |
1901 | 1899 | | |
1902 | 1900 | | |
1903 | | - | |
| 1901 | + | |
1904 | 1902 | | |
1905 | 1903 | | |
1906 | 1904 | | |
| |||
2114 | 2112 | | |
2115 | 2113 | | |
2116 | 2114 | | |
2117 | | - | |
2118 | | - | |
2119 | | - | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
2120 | 2118 | | |
2121 | 2119 | | |
2122 | 2120 | | |
| |||
2495 | 2493 | | |
2496 | 2494 | | |
2497 | 2495 | | |
2498 | | - | |
2499 | 2496 | | |
2500 | 2497 | | |
2501 | 2498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
| 350 | + | |
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| |||
0 commit comments