mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-16 09:48:08 +00:00
Improve span shortening.
Co-Authored-By: daxpedda <1645124+daxpedda@users.noreply.github.com>
This commit is contained in:
parent
2e0977f3b4
commit
e70f9456fc
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ fn span_use_self_lint(cx: &LateContext<'_, '_>, path: &Path) {
|
|||
let last_path_span = path.segments.last().expect(SEGMENTS_MSG).ident.span;
|
||||
// `to()` doesn't shorten span, so we shorten it with `until(..)`
|
||||
// and then include it with `to(..)`
|
||||
let span = path.span.until(last_path_span).to(last_path_span);
|
||||
let span = path.span.with_hi(last_path_span.hi());
|
||||
|
||||
span_lint_and_sugg(
|
||||
cx,
|
||||
|
|
Loading…
Reference in a new issue