diff options
| author | bors <bors@rust-lang.org> | 2023-12-24 07:56:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-24 07:56:37 +0000 |
| commit | cf6427373b8b6d4b8efed2087fb9df5149e69e67 (patch) | |
| tree | 2136f679fb5c65f0cca27762a90c76968f444183 /tests/codegen/inherit_overflow.rs | |
| parent | 3166bbef9248fce2695899e21203f42a21046551 (diff) | |
| parent | 6630d690859d882b2528a39317a701da64fe1203 (diff) | |
| download | rust-cf6427373b8b6d4b8efed2087fb9df5149e69e67.tar.gz rust-cf6427373b8b6d4b8efed2087fb9df5149e69e67.zip | |
Auto merge of #119238 - Mark-Simulacrum:def-hash-efficiency, r=cjgillot
Skip duplicate stable crate ID encoding into metadata Instead, we store just the local crate hash as a bare u64. On decoding, we recombine it with the crate's stable crate ID stored separately in metadata. The end result is that we save ~8 bytes/DefIndex in metadata size. One key detail here is that we no longer distinguish in encoded metadata between present and non-present DefPathHashes. It used to be highly likely we could distinguish as we used DefPathHash::default(), an all-zero representation. However in theory even that is fallible as nothing strictly prevents the StableCrateId from being zero. In review it was pointed out that we should never have a missing hash for a DefIndex anyway, so this shouldn't matter.
Diffstat (limited to 'tests/codegen/inherit_overflow.rs')
0 files changed, 0 insertions, 0 deletions
