For better consistency change mir_opt_level <= 1 to < 2

This commit is contained in:
Santiago Pastorino 2021-03-03 19:41:04 -03:00
parent 8152da22a1
commit fde8d6ee81
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}