Commit 661b33f
committed
Auto merge of #109935 - michaelwoerister:fix-feed-in-eval-always, r=cjgillot
incr.comp.: Make sure dependencies are recorded when feeding queries during eval-always queries.
This PR makes sure we don't drop dependency edges when feeding queries during an eval-always query.
Background: During eval-always queries, no dependencies are recorded because the system knows to unconditionally re-evaluate them regardless of any actual dependencies. This works fine for these queries themselves but leads to a problem when feeding other queries: When queries are fed, we set up their dependency edges by copying the current set of dependencies of the feeding query. But because this set is empty for eval-always queries, we record no edges at all -- which has the effect that the fed query instances always look "green" to the system, although they should always be "red".
The fix is to explicitly add a dependency on the artificial "always red" dep-node when feeding during eval-always queries.
Fixes #108481
Maybe also fixes issue #88488.
cc `@jyn514`
r? `@cjgillot` or `@oli-obk`File tree
3 files changed
+49
-13
lines changed- compiler
- rustc_passes/src
- rustc_query_system/src/dep_graph
- tests/incremental
3 files changed
+49
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
156 | 169 | | |
157 | 170 | | |
158 | 171 | | |
| |||
353 | 366 | | |
354 | 367 | | |
355 | 368 | | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
| 369 | + | |
| 370 | + | |
360 | 371 | | |
361 | 372 | | |
362 | 373 | | |
| |||
461 | 472 | | |
462 | 473 | | |
463 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
464 | 480 | | |
465 | 481 | | |
466 | 482 | | |
| |||
563 | 579 | | |
564 | 580 | | |
565 | 581 | | |
566 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
567 | 586 | | |
568 | 587 | | |
569 | 588 | | |
| |||
1356 | 1375 | | |
1357 | 1376 | | |
1358 | 1377 | | |
1359 | | - | |
1360 | | - | |
| 1378 | + | |
1361 | 1379 | | |
1362 | | - | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
1363 | 1385 | | |
1364 | 1386 | | |
1365 | 1387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments