Improve comment in closure migration code.
This commit is contained in:
parent
99a0477f65
commit
cd7f960314
1 changed files with 3 additions and 3 deletions
|
@ -648,9 +648,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
let mut closure_body_span = self.tcx.hir().span(body_id.hir_id);
|
let mut closure_body_span = self.tcx.hir().span(body_id.hir_id);
|
||||||
|
|
||||||
// If the body was entirely expanded from a macro
|
// If the body was entirely expanded from a macro
|
||||||
// invocation, as the body is not contained inside the
|
// invocation, i.e. the body is not contained inside the
|
||||||
// closure span. In that case, we walk up the expansion
|
// closure span, then we walk up the expansion until we
|
||||||
// until we find the span before the expansion.
|
// find the span before the expansion.
|
||||||
while !closure_body_span.is_dummy() && !closure_span.contains(closure_body_span) {
|
while !closure_body_span.is_dummy() && !closure_span.contains(closure_body_span) {
|
||||||
closure_body_span = closure_body_span.parent().unwrap_or(DUMMY_SP);
|
closure_body_span = closure_body_span.parent().unwrap_or(DUMMY_SP);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue