rust/compiler/rustc_ty_utils/src
Matthias Krüger eaf420638e
Rollup merge of #133088 - the8472:randomize-me-harder, r=workingjubilee
`-Zrandomize-layout` harder. `Foo<T> != Foo<U>`

Tracking issue: #106764

Previously randomize-layout only used a deterministic shuffle based on the seed stored in an Adt's ReprOptions, meaning that `Foo<T>`  and `Foo<U>` were shuffled by the same seed. This change adds a similar seed to each calculated LayoutData so that a struct can be randomized both based on the layout of its fields and its per-type seed.
Primitives start with simple seed derived from some of their properties. Though some types can no longer be distinguished at that point, e.g. usize and u64 will still be treated the same.
2025-01-10 06:28:37 +01:00
..
layout make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
abi.rs Implement projection and shim for AFIDT 2024-12-10 16:52:20 +00:00
assoc.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
common_traits.rs move fn is_item_raw to TypingEnv 2024-11-19 18:06:20 +01:00
consts.rs Remove the now-useless Result from lit_to_const 2025-01-09 08:48:46 +00:00
errors.rs Add warn(unreachable_pub) to rustc_ty_utils. 2024-09-03 08:50:33 +10:00
implied_bounds.rs uplift fold_regions to rustc_type_ir 2024-11-28 10:40:58 +01:00
instance.rs Begin to implement type system layer of unsafe binders 2024-12-22 21:57:57 +00:00
layout.rs Foo<T> != Foo<U> under layout randomization 2025-01-10 02:22:57 +01:00
lib.rs compiler: pre-move code for fixing enum layout ICEs 2024-10-20 02:09:22 -07:00
needs_drop.rs Begin to implement type system layer of unsafe binders 2024-12-22 21:57:57 +00:00
opaque_types.rs Encode cross-crate opaque type origin 2024-10-31 01:35:13 +00:00
representability.rs Remove extern crate rustc_middle from rustc_ty_utils. 2024-05-13 08:20:18 +10:00
sig_types.rs nit: Make get_infer_ret_ty name more consistent with is_suggestable_infer_ty 2025-01-02 23:39:16 +00:00
structural_match.rs TypingMode 🤔 2024-10-29 17:01:24 +01:00
ty.rs Begin to implement type system layer of unsafe binders 2024-12-22 21:57:57 +00:00