1
Fork 0

fix safe-transmute handling of enums

This commit is contained in:
Ralf Jung 2024-11-30 19:33:23 +01:00
parent a36652c274
commit 611a99188e
7 changed files with 74 additions and 63 deletions

View file

@ -1086,6 +1086,8 @@ rustc_queries! {
}
/// Computes the tag (if any) for a given type and variant.
/// `None` means that the variant doesn't need a tag (because it is niched).
/// Will panic for uninhabited variants.
query tag_for_variant(
key: (Ty<'tcx>, abi::VariantIdx)
) -> Option<ty::ScalarInt> {