From 236e1c2a85d0c0f33f15f2ecef655b080e8d3473 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Mon, 15 May 2023 13:36:05 +0000 Subject: [PATCH] wip: disable StorageLive check. --- compiler/rustc_const_eval/src/transform/validate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_const_eval/src/transform/validate.rs b/compiler/rustc_const_eval/src/transform/validate.rs index eaf4abf39b740..303de9509590f 100644 --- a/compiler/rustc_const_eval/src/transform/validate.rs +++ b/compiler/rustc_const_eval/src/transform/validate.rs @@ -302,7 +302,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> { ); } - if self.reachable_blocks.contains(location.block) && context.is_use() { + if false && self.reachable_blocks.contains(location.block) && context.is_use() { // We check that the local is live whenever it is used. Technically, violating this // restriction is only UB and not actually indicative of not well-formed MIR. This means // that an optimization which turns MIR that already has UB into MIR that fails this