From 47a00d53379da5f226ec1c69d742f1bde3f29523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannis=20Christopher=20K=C3=B6hl?= Date: Thu, 1 Sep 2022 14:22:37 +0200 Subject: [PATCH] Flood with bottom instead of top for unreachable branches --- compiler/rustc_mir_transform/src/dataflow_const_prop.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs index b05b0fdfd43..f461514716e 100644 --- a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs +++ b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs @@ -182,8 +182,8 @@ impl<'tcx> ValueAnalysis<'tcx> for ConstAnalysis<'tcx> { // Branch is taken. Has no effect on state. handled = true; } else { - // Branch is not taken, we can flood everything. - state.flood_all(); + // Branch is not taken, we can flood everything with bottom. + state.flood_all_with(FlatSet::Bottom); } }) }