From 1d9a3b01c4af6e6c6e0650b4d4e769f8ec59450c Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sun, 3 Nov 2024 13:13:04 -0800 Subject: [PATCH] codegen: Ask the layout if it is uninhabited, not its impl detail --- kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs b/kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs index 933ad4ec3a4c..c31dc6597a99 100644 --- a/kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs +++ b/kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs @@ -721,7 +721,7 @@ impl GotocCtx<'_> { // For all intrinsics we first check `is_uninhabited` to give a more // precise error message - if layout.backend_repr.is_uninhabited() { + if layout.is_uninhabited() { return self.codegen_fatal_error( PropertyClass::SafetyCheck, &format!(