Fix the bug of next_point in span

This commit is contained in:
yukang 2022-10-18 02:00:06 +08:00
parent 11432fe952
commit 0af255a5aa
7 changed files with 13 additions and 13 deletions

View file

@ -1731,7 +1731,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
for _ in 0..100 {
// Try to find an assignment
sp = sm.next_point(sp);
let snippet = sm.span_to_snippet(sp.to(sm.next_point(sp)));
let snippet = sm.span_to_snippet(sp);
match snippet {
Ok(ref x) if x.as_str() == "=" => {
err.span_suggestion(