1
Fork 0

cleanup: Span::new -> Span::with_lo

This commit is contained in:
Vadim Petrochenkov 2021-08-21 18:07:21 +03:00
parent db002a06ae
commit 1df0b73196
5 changed files with 6 additions and 14 deletions

View file

@ -189,7 +189,7 @@ impl Scope {
// To avoid issues with macro-generated spans, the span
// of the statement must be nested in that of the block.
if span.lo() <= stmt_span.lo() && stmt_span.lo() <= span.hi() {
return Span::new(stmt_span.lo(), span.hi(), span.ctxt());
return span.with_lo(stmt_span.lo());
}
}
}