Commit edebf77
committed
Auto merge of rust-lang#89408 - Mark-Simulacrum:fix-query-nondet, r=petrochenkov
Avoid nondeterminism in trimmed_def_paths
Previously this query depended on the global interning order of Symbols, which
meant that irrelevant changes could influence the query and cause
recompilations. This commit ensures that the return set is stable and will not
be affected by the global order by deterministically (in lexicographic order)
choosing a name to use if there are multiple names for a single DefId.
This should fix the cause of the [regressions] in rust-lang#83343.
[regressions]: https://perf.rust-lang.org/compare.html?start=9620f3a84b079decfdc2e557be007580b097fe43&end=addb4da686a97da46159f0123cb6cdc2ce3d7fdb1 file changed
+23
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2408 | 2408 | | |
2409 | 2409 | | |
2410 | 2410 | | |
2411 | | - | |
| 2411 | + | |
2412 | 2412 | | |
2413 | 2413 | | |
2414 | 2414 | | |
| |||
2446 | 2446 | | |
2447 | 2447 | | |
2448 | 2448 | | |
| 2449 | + | |
| 2450 | + | |
2449 | 2451 | | |
2450 | | - | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
2451 | 2472 | | |
2452 | 2473 | | |
2453 | 2474 | | |
| |||
0 commit comments