diff options
| author | bors <bors@rust-lang.org> | 2025-07-17 08:36:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-17 08:36:42 +0000 |
| commit | 8c12d76304fcceaeaad0d67209e5727e94f5f2b8 (patch) | |
| tree | b0fd5074dc6cae1780fe6b613e4d754cbb5fedef /compiler/rustc_resolve/src | |
| parent | f8f6997469237299c1d60814c7b9828602a1f8e4 (diff) | |
| parent | 068f3ac20b4074b523e80c07b3bf139ced9374dd (diff) | |
| download | rust-8c12d76304fcceaeaad0d67209e5727e94f5f2b8.tar.gz rust-8c12d76304fcceaeaad0d67209e5727e94f5f2b8.zip | |
Auto merge of #142903 - cjgillot:local-def-path-hash, r=compiler-errors
Only inherit local hash for paths `DefPathHash`, as the counterpart of `DefId` that is stable across compiler invocations, is comprised of 2 parts. The first one is the `StableCrateId`, stable form of `CrateNum`. The second is 64 complementary bits to identify the crate-local definition. The current implementation always hashes the full 128 bits when (1) trying to create a new child `DefPathHash` or (2) hashing a `CrateNum` or a `LocalDefId`. But we only need half that information: `LocalDefId` means that the `StableCrateId` is always the current crate's ; `CrateNum` means that we do not care about the local part. As stable hashing is very hot in the query system, in particular hashing definitions, this is a big deal. We still want the local part to change when the `StableCrateId` changes, to make incr-compilation errors less painful, ie. increase the likelihood that if will magically disappear by changing some code. This PR sprinkles some `#[inline]` attributes on small functions that appeared in profiles.
Diffstat (limited to 'compiler/rustc_resolve/src')
0 files changed, 0 insertions, 0 deletions
