We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e0977f commit e70f945Copy full SHA for e70f945
clippy_lints/src/use_self.rs
@@ -60,7 +60,7 @@ fn span_use_self_lint(cx: &LateContext<'_, '_>, path: &Path) {
60
let last_path_span = path.segments.last().expect(SEGMENTS_MSG).ident.span;
61
// `to()` doesn't shorten span, so we shorten it with `until(..)`
62
// and then include it with `to(..)`
63
- let span = path.span.until(last_path_span).to(last_path_span);
+ let span = path.span.with_hi(last_path_span.hi());
64
65
span_lint_and_sugg(
66
cx,
0 commit comments