Skip to content

Commit 7ecefd0

Browse files
authored
Rollup merge of #152315 - cuiweixie:bugfix-span, r=jieyouxu
fix: rhs_span to rhs_span_new
2 parents c1f716a + 40a264c commit 7ecefd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,7 @@ fn suggest_ampmut<'tcx>(
16951695
&& let Either::Left(rhs_stmt_new) = body.stmt_at(*assign)
16961696
&& let StatementKind::Assign(box (_, rvalue_new)) = &rhs_stmt_new.kind
16971697
&& let rhs_span_new = rhs_stmt_new.source_info.span
1698-
&& let Ok(rhs_str_new) = tcx.sess.source_map().span_to_snippet(rhs_span)
1698+
&& let Ok(rhs_str_new) = tcx.sess.source_map().span_to_snippet(rhs_span_new)
16991699
{
17001700
(rvalue, rhs_span, rhs_str) = (rvalue_new, rhs_span_new, rhs_str_new);
17011701
}

0 commit comments

Comments
 (0)