Commit baffc5e
authored
Rollup merge of #154201 - Zalathar:try-set-color, r=nnethercote
Use enums to clarify `DepNodeColorMap` color marking
When a function's documentation has to explain the meaning of nested results and options, then it is often a good candidate for using a custom result enum instead.
This PR also renames `DepNodeColorMap::try_mark` to `try_set_color`, to make it more distinct from the similarly-named `DepGraph::try_mark_green`.
The difference is that `try_mark_green` is a higher-level operation that tries to determine whether a node _can_ be marked green, whereas `try_set_color` is a lower-level operation that actually records a colour for the node.
The updated docs for `try_set_color` also fix a typo: *atomicaly* → *atomically*.
r? nnethercote (or compiler)3 files changed
Lines changed: 55 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
1415 | 1416 | | |
1416 | 1417 | | |
1417 | 1418 | | |
1418 | | - | |
1419 | | - | |
| 1419 | + | |
| 1420 | + | |
1420 | 1421 | | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
| 1422 | + | |
| 1423 | + | |
1424 | 1424 | | |
1425 | | - | |
| 1425 | + | |
1426 | 1426 | | |
1427 | 1427 | | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
1433 | 1431 | | |
1434 | | - | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
1435 | 1436 | | |
1436 | 1437 | | |
1437 | 1438 | | |
1438 | | - | |
1439 | | - | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
1440 | 1442 | | |
1441 | 1443 | | |
1442 | 1444 | | |
| |||
1454 | 1456 | | |
1455 | 1457 | | |
1456 | 1458 | | |
| 1459 | + | |
1457 | 1460 | | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
1462 | | - | |
1463 | | - | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
1464 | 1481 | | |
1465 | 1482 | | |
1466 | 1483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
| 908 | + | |
908 | 909 | | |
909 | | - | |
| 910 | + | |
910 | 911 | | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
915 | 916 | | |
916 | 917 | | |
917 | 918 | | |
| |||
923 | 924 | | |
924 | 925 | | |
925 | 926 | | |
926 | | - | |
| 927 | + | |
| 928 | + | |
927 | 929 | | |
928 | 930 | | |
929 | 931 | | |
| |||
935 | 937 | | |
936 | 938 | | |
937 | 939 | | |
938 | | - | |
| 940 | + | |
939 | 941 | | |
940 | | - | |
941 | | - | |
| 942 | + | |
| 943 | + | |
942 | 944 | | |
943 | 945 | | |
944 | 946 | | |
| |||
949 | 951 | | |
950 | 952 | | |
951 | 953 | | |
952 | | - | |
| 954 | + | |
| 955 | + | |
953 | 956 | | |
954 | 957 | | |
955 | 958 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
0 commit comments