From 186592eaad59befc94555ad9fb6b6909051ccf6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Rakic?= Date: Tue, 13 May 2025 14:40:12 +0000 Subject: [PATCH] wip --- compiler/rustc_ty_utils/src/layout/invariant.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/rustc_ty_utils/src/layout/invariant.rs b/compiler/rustc_ty_utils/src/layout/invariant.rs index 7423a156a217a..fe9ea8ae8d58e 100644 --- a/compiler/rustc_ty_utils/src/layout/invariant.rs +++ b/compiler/rustc_ty_utils/src/layout/invariant.rs @@ -8,14 +8,14 @@ use rustc_middle::ty::layout::{HasTyCtxt, LayoutCx, TyAndLayout}; pub(super) fn layout_sanity_check<'tcx>(cx: &LayoutCx<'tcx>, layout: &TyAndLayout<'tcx>) { let tcx = cx.tcx(); - // Type-level uninhabitedness should always imply ABI uninhabitedness. - if layout.ty.is_privately_uninhabited(tcx, cx.typing_env) { - assert!( - layout.is_uninhabited(), - "{:?} is type-level uninhabited but not ABI-uninhabited?", - layout.ty - ); - } + // // Type-level uninhabitedness should always imply ABI uninhabitedness. + // if layout.ty.is_privately_uninhabited(tcx, cx.typing_env) { + // assert!( + // layout.is_uninhabited(), + // "{:?} is type-level uninhabited but not ABI-uninhabited?", + // layout.ty + // ); + // } if layout.size.bytes() % layout.align.abi.bytes() != 0 { bug!("size is not a multiple of align, in the following layout:\n{layout:#?}");