about summary refs log tree commit diff
diff options
context:
space:
mode:
authordaxpedda <daxpedda@users.noreply.github.com>2019-01-22 15:23:45 +0100
committerdaxpedda <daxpedda@users.noreply.github.com>2019-01-22 15:23:45 +0100
commit42d5a07f0ca4d0a3d17f2d2634862dc73bf82d2f (patch)
treebd02b58ed81f2ffab750794f638510dae22a3393
parente6f2239bc3bfec1cf37a0e28bd83b6ba9b809520 (diff)
downloadrust-42d5a07f0ca4d0a3d17f2d2634862dc73bf82d2f.tar.gz
rust-42d5a07f0ca4d0a3d17f2d2634862dc73bf82d2f.zip
Improving comments.
-rw-r--r--clippy_lints/src/use_self.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/clippy_lints/src/use_self.rs b/clippy_lints/src/use_self.rs
index 5d4d5bac4c7..88cf01987b5 100644
--- a/clippy_lints/src/use_self.rs
+++ b/clippy_lints/src/use_self.rs
@@ -58,8 +58,7 @@ const SEGMENTS_MSG: &str = "segments should be composed of at least 1 element";
 fn span_use_self_lint(cx: &LateContext<'_, '_>, path: &Path) {
     // path segments only include actual path, no methods or fields
     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(..)`
+    // only take path up to the end of last_path_span
     let span = path.span.with_hi(last_path_span.hi());
 
     span_lint_and_sugg(