rust/compiler/rustc_ty_utils/src
Matthias Krüger 6e87eb58ed
Rollup merge of #133681 - RalfJung:niches, r=wesleywiser
improve TagEncoding::Niche docs, sanity check, and UB checks

Turns out the `niche_variants` range can actually contain the `untagged_variant`. We should report this as UB in Miri, so this PR implements that.

Also rename `partially_check_layout` to `layout_sanity_check` for better consistency with how similar functions are called in other parts of the compiler.

Turns out my adjustments to the transmutation logic also fix https://github.com/rust-lang/rust/issues/126267.
2024-12-03 21:55:26 +01:00
..
layout improve TagEncoding::Niche docs and sanity check 2024-11-30 18:26:30 +01:00
abi.rs move fn is_item_raw to TypingEnv 2024-11-19 18:06:20 +01:00
assoc.rs ty::KContainer -> ty::AssocItemContainer::K 2024-11-04 04:45:52 +00:00
common_traits.rs move fn is_item_raw to TypingEnv 2024-11-19 18:06:20 +01:00
consts.rs compiler: Directly use rustc_abi in ty_utils 2024-11-03 13:38:47 -08: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 Move refinement check out of compare_impl_item 2024-11-30 16:45:01 +00:00
layout.rs report UB when the niche value refers to the untagged variant 2024-11-30 18:26:30 +01:00
lib.rs compiler: pre-move code for fixing enum layout ICEs 2024-10-20 02:09:22 -07:00
needs_drop.rs remove Ty::is_copy_modulo_regions 2024-12-02 13:57:56 +01: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 Stop using a special inner body for the coroutine by-move body for async closures 2024-08-26 18:44:19 -04:00
structural_match.rs TypingMode 🤔 2024-10-29 17:01:24 +01:00
ty.rs uplift fold_regions to rustc_type_ir 2024-11-28 10:40:58 +01:00