For better consistency change mir_opt_level <= 1 to < 2
This commit is contained in:
parent
8152da22a1
commit
fde8d6ee81
|
@ -129,7 +129,7 @@ impl<'tcx> MirPass<'tcx> for DestinationPropagation {
|
|||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
// Only run at mir-opt-level=2 or higher for now (we don't fix up debuginfo and remove
|
||||
// storage statements at the moment).
|
||||
if tcx.sess.mir_opt_level() <= 1 {
|
||||
if tcx.sess.mir_opt_level() < 2 {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ pub struct MatchBranchSimplification;
|
|||
|
||||
impl<'tcx> MirPass<'tcx> for MatchBranchSimplification {
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
if tcx.sess.mir_opt_level() <= 1 {
|
||||
if tcx.sess.mir_opt_level() < 2 {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue