rust/compiler/rustc_hir/src
bors 243c5a35e1 Auto merge of #140453 - Zoxc:next-disambiguator, r=oli-obk
Remove global `next_disambiguator` state and handle it with a `DisambiguatorState` type

This removes `Definitions.next_disambiguator` as it doesn't guarantee deterministic def paths when `create_def` is called in parallel. Instead a new `DisambiguatorState` type is passed as a mutable reference to `create_def` to help create unique def paths. `create_def` calls with distinct  `DisambiguatorState` instances must ensure that that the def paths are unique without its help.

Anon associated types did rely on this global state for uniqueness and are changed to use (method they're defined in + their position in the method return type) as the `DefPathData` to ensure uniqueness. This also means that the method they're defined in appears in error messages, which is nicer.

`DefPathData::NestedStatic` is added to use for nested data inside statics instead of reusing `DefPathData::AnonConst` to avoid conflicts with those.

cc `@oli-obk`
2025-05-05 11:50:43 +00:00
..
hir Extend HIR to track the source and syntax of a lifetime 2025-04-23 16:37:39 -04:00
arena.rs Add hir::Attribute 2024-12-15 19:18:46 +01:00
def_path_hash_map.rs Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer 2025-02-16 16:18:30 -05:00
def.rs Add DefPathData::NestedStatic instead of reusing DefPathData::AnonConst 2025-05-02 13:36:55 +02:00
definitions.rs Split get_opt_name hashing use into hashed_symbol 2025-05-02 13:40:49 +02:00
diagnostic_items.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hir_id.rs impl !PartialOrd for HirId 2025-04-03 09:22:21 +00:00
hir.rs Rollup merge of #140572 - nnethercote:comment-ExprKind-If, r=compiler-errors 2025-05-02 19:38:00 +02:00
intravisit.rs Add or-patterns to pattern types 2025-04-28 07:50:18 +00:00
lang_items.rs AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added. 2025-04-28 16:23:13 +07:00
lib.rs Simplify LazyAttrTokenStream. 2025-04-30 07:10:56 +10:00
pat_util.rs Eliminate PatKind::Path 2025-01-29 15:45:13 +00:00
stable_hash_impls.rs Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
target.rs Implment #[cfg] and #[cfg_attr] in where clauses 2025-03-01 22:02:46 +08:00
tests.rs Allow drivers to supply a list of extra symbols to intern 2025-04-10 13:39:23 +00:00
weak_lang_items.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00