Skip to content

Commit a334848

Browse files
committed
Re-enable the early otherwise branch optimization
1 parent f5c256f commit a334848

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_mir_transform/src/early_otherwise_branch.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ pub struct EarlyOtherwiseBranch;
9292

9393
impl<'tcx> MirPass<'tcx> for EarlyOtherwiseBranch {
9494
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
95-
// unsound: https://github.com/rust-lang/rust/issues/95162
96-
sess.mir_opt_level() >= 3 && sess.opts.unstable_opts.unsound_mir_opts
95+
sess.mir_opt_level() >= 2
9796
}
9897

9998
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {

0 commit comments

Comments
 (0)