rust/compiler/rustc_const_eval/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
..
check_consts Clean up "const" situation in format_args!(). 2025-05-01 11:55:23 +02:00
const_eval Move DisambiguatorState into intern_const_alloc_recursive 2025-05-02 15:51:26 +02:00
interpret Auto merge of #140453 - Zoxc:next-disambiguator, r=oli-obk 2025-05-05 11:50:43 +00:00
util Remove weak alias terminology 2025-04-24 11:59:20 +01:00
errors.rs interpret: better error message for out-of-bounds pointer arithmetic and accesses 2025-04-30 18:45:41 +02:00
lib.rs Make #![feature(let_chains)] bootstrap conditional in compiler/ 2025-04-23 16:40:30 +02:00