Skip to content

Commit 307c608

Browse files
committed
Do not call super_rvalue if not needed
1 parent 603ab5b commit 307c608

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_mir/src/transform/instcombine.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl<'tcx> MutVisitor<'tcx> for InstCombineVisitor<'tcx> {
8181
*rvalue = Rvalue::Use(Operand::Copy(place));
8282
}
8383

84-
self.super_rvalue(rvalue, location)
84+
// We do not call super_rvalue as we are not interested in any other parts of the tree
8585
}
8686
}
8787

@@ -285,7 +285,7 @@ impl Visitor<'tcx> for OptimizationFinder<'b, 'tcx> {
285285

286286
self.find_unneeded_equality_comparison(rvalue, location);
287287

288-
self.super_rvalue(rvalue, location)
288+
// We do not call super_rvalue as we are not interested in any other parts of the tree
289289
}
290290
}
291291

0 commit comments

Comments
 (0)