Make comment more explicit.

This commit is contained in:
Camille GILLOT 2023-03-07 17:12:42 +00:00
parent b55c4f8312
commit 0d56034a25
2 changed files with 4 additions and 2 deletions

View File

@ -891,7 +891,8 @@ impl<'tcx> MutVisitor<'tcx> for ConstPropagator<'_, 'tcx> {
fn visit_statement(&mut self, statement: &mut Statement<'tcx>, location: Location) {
trace!("visit_statement: {:?}", statement);
// Recurse into statement before applying the assignment.
// We want to evaluate operands before any change to the assigned-to value,
// so we recurse first.
self.super_statement(statement, location);
match statement.kind {

View File

@ -556,7 +556,8 @@ impl<'tcx> Visitor<'tcx> for ConstPropagator<'_, 'tcx> {
let source_info = statement.source_info;
self.source_info = Some(source_info);
// Recurse into statement before applying the assignment.
// We want to evaluate operands before any change to the assigned-to value,
// so we recurse first.
self.super_statement(statement, location);
match statement.kind {