Skip to content

Commit c86b7b4

Browse files
committed
For better consistency change mir_opt_level <= 1 to < 2
1 parent e2e9e49 commit c86b7b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_mir/src/transform/dest_prop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl<'tcx> MirPass<'tcx> for DestinationPropagation {
129129
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
130130
// Only run at mir-opt-level=2 or higher for now (we don't fix up debuginfo and remove
131131
// storage statements at the moment).
132-
if tcx.sess.mir_opt_level() <= 1 {
132+
if tcx.sess.mir_opt_level() < 2 {
133133
return;
134134
}
135135

compiler/rustc_mir/src/transform/match_branches.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub struct MatchBranchSimplification;
4040
4141
impl<'tcx> MirPass<'tcx> for MatchBranchSimplification {
4242
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
43-
if tcx.sess.mir_opt_level() <= 1 {
43+
if tcx.sess.mir_opt_level() < 2 {
4444
return;
4545
}
4646

0 commit comments

Comments
 (0)