Skip to content

Commit 1f9d960

Browse files
committed
Re-enable SimplifyToExp in match_branches.
1 parent 8b9d7b1 commit 1f9d960

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

Diff for: compiler/rustc_mir_transform/src/match_branches.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ impl<'tcx> MirPass<'tcx> for MatchBranchSimplification {
4444
should_cleanup = true;
4545
continue;
4646
}
47-
// unsound: https://github.com/rust-lang/rust/issues/124150
48-
if tcx.sess.opts.unstable_opts.unsound_mir_opts
49-
&& SimplifyToExp::default().simplify(tcx, body, bb_idx, param_env).is_some()
50-
{
47+
if SimplifyToExp::default().simplify(tcx, body, bb_idx, param_env).is_some() {
5148
should_cleanup = true;
5249
continue;
5350
}

Diff for: tests/mir-opt/matches_reduce_branches.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ test-mir-pass: MatchBranchSimplification
2-
//@ compile-flags: -Zunsound-mir-opts
32

43
#![feature(repr128)]
54
#![feature(core_intrinsics)]

Diff for: tests/mir-opt/matches_u8.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// skip-filecheck
22
//@ test-mir-pass: MatchBranchSimplification
3-
//@ compile-flags: -Zunsound-mir-opts
43

54
// EMIT_MIR matches_u8.exhaustive_match.MatchBranchSimplification.diff
65
// EMIT_MIR matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff

0 commit comments

Comments
 (0)