diff options
| author | Jannis Christopher Köhl <mail@koehl.dev> | 2022-09-01 14:22:37 +0200 |
|---|---|---|
| committer | Jannis Christopher Köhl <mail@koehl.dev> | 2022-11-07 10:35:12 +0100 |
| commit | 47a00d53379da5f226ec1c69d742f1bde3f29523 (patch) | |
| tree | f03c3b67ab9c6a6d3f50b38d059c176fb20d9a06 | |
| parent | ad99d2e15dd9f36a1b84359f8b9bb9ffbaa5ac60 (diff) | |
| download | rust-47a00d53379da5f226ec1c69d742f1bde3f29523.tar.gz rust-47a00d53379da5f226ec1c69d742f1bde3f29523.zip | |
Flood with bottom instead of top for unreachable branches
| -rw-r--r-- | compiler/rustc_mir_transform/src/dataflow_const_prop.rs | 4 |
1 files 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); } }) } |
