rust/compiler/rustc_span/src
bors 8c12d76304 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.
2025-07-17 08:36:42 +00:00
..
analyze_source_file Be more accurate about calculating display_col from a BytePos 2024-07-18 20:08:38 +00:00
edit_distance update cfg(bootstrap) 2025-01-08 21:26:39 +01:00
source_map Take into-account -Zremap-path-scope when embedding filenames 2025-05-05 19:45:34 +02:00
symbol Introduce ByteSymbol. 2025-06-30 20:42:27 +10:00
analyze_source_file.rs Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
caching_source_map_view.rs Do not clone Arc when hashing span. 2025-06-11 23:44:22 +00:00
def_id.rs Hash less while hashing def-ids. 2025-06-22 20:29:39 +00:00
edit_distance.rs use div_ceil instead of manual logic 2025-07-05 10:55:42 +02:00
edition.rs Unify the format of rustc cli flags 2025-04-24 12:54:40 +08:00
fatal_error.rs Auto merge of #117557 - Zoxc:panic-prio, r=petrochenkov 2023-11-09 00:39:02 +00:00
hygiene.rs remove DesugaringKind::CondTemporary 2025-07-05 17:14:06 -07:00
lib.rs setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
profiling.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
source_map.rs Take into-account -Zremap-path-scope when embedding filenames 2025-05-05 19:45:34 +02:00
span_encoding.rs Optimize the codegen for Span::from_expansion 2025-04-30 11:38:09 -04:00
symbol.rs Auto merge of #144044 - fmease:rollup-kg413pt, r=fmease 2025-07-17 05:24:30 +00:00
tests.rs add unstable support for outputting file checksums for use in cargo 2024-10-01 21:23:20 -06:00