Commit 06b420a
committed
local_def_path_hash_to_def_id can fail
local_def_path_hash_to_def_id is used by Debug impl for DepNode and it
looks for DefPathHash inside the current compilation. During incremental
compilation we are going through nodes that belong to a previous
compilation and might not be present and a simple attempt to print such
node with tracing::debug (try_mark_parent_green does it for example)
results in a otherwise avoidable panic
Panic was added in rust-lang#82183,
specifically in 2b60338, with a comment "We only use this mapping for
cases where we know that it must succeed.", but I'm not sure if this
property holds when we traverse nodes from the old compilation in order
to figure out if they are valid or not1 parent db5ed4b commit 06b420a
File tree
4 files changed
+10
-36
lines changed- compiler
- rustc_hir/src
- rustc_middle/src
- dep_graph
- query
- ty
4 files changed
+10
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 380 | + | |
385 | 381 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | 382 | | |
392 | 383 | | |
393 | 384 | | |
394 | 385 | | |
395 | | - | |
396 | 386 | | |
397 | 387 | | |
398 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 197 | + | |
201 | 198 | | |
202 | 199 | | |
203 | 200 | | |
| |||
390 | 387 | | |
391 | 388 | | |
392 | 389 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
| 390 | + | |
399 | 391 | | |
400 | 392 | | |
401 | 393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1677 | 1677 | | |
1678 | 1678 | | |
1679 | 1679 | | |
1680 | | - | |
1681 | | - | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
| 1680 | + | |
1685 | 1681 | | |
1686 | 1682 | | |
1687 | 1683 | | |
1688 | 1684 | | |
1689 | 1685 | | |
1690 | 1686 | | |
1691 | 1687 | | |
1692 | | - | |
1693 | | - | |
1694 | | - | |
1695 | | - | |
1696 | | - | |
| 1688 | + | |
1697 | 1689 | | |
1698 | | - | |
| 1690 | + | |
1699 | 1691 | | |
1700 | 1692 | | |
1701 | 1693 | | |
| |||
0 commit comments