Skip to content

Commit cd7f960

Browse files
committed
Improve comment in closure migration code.
1 parent 99a0477 commit cd7f960

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_typeck/src/check/upvar.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
648648
let mut closure_body_span = self.tcx.hir().span(body_id.hir_id);
649649

650650
// If the body was entirely expanded from a macro
651-
// invocation, as the body is not contained inside the
652-
// closure span. In that case, we walk up the expansion
653-
// until we find the span before the expansion.
651+
// invocation, i.e. the body is not contained inside the
652+
// closure span, then we walk up the expansion until we
653+
// find the span before the expansion.
654654
while !closure_body_span.is_dummy() && !closure_span.contains(closure_body_span) {
655655
closure_body_span = closure_body_span.parent().unwrap_or(DUMMY_SP);
656656
}

0 commit comments

Comments
 (0)