about summary refs log tree commit diff
diff options
context:
space:
mode:
authordswij <dswijj@gmail.com>2022-03-17 14:33:09 +0800
committerdswij <dswijj@gmail.com>2022-03-17 14:38:39 +0800
commitbd888d435423a47ce3bdbaec6c61a3cb093a7e18 (patch)
tree52261056b593fbde274a3fc79ce47a1d004aef66
parent6a3dbe4798e3966b80b16373fda75f5e4dd91384 (diff)
downloadrust-bd888d435423a47ce3bdbaec6c61a3cb093a7e18.tar.gz
rust-bd888d435423a47ce3bdbaec6c61a3cb093a7e18.zip
Add some comments
-rw-r--r--clippy_lints/src/methods/unnecessary_lazy_eval.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/clippy_lints/src/methods/unnecessary_lazy_eval.rs b/clippy_lints/src/methods/unnecessary_lazy_eval.rs
index 0dd41a4dacf..2369be70812 100644
--- a/clippy_lints/src/methods/unnecessary_lazy_eval.rs
+++ b/clippy_lints/src/methods/unnecessary_lazy_eval.rs
@@ -48,6 +48,9 @@ pub(super) fn check<'tcx>(
                     Applicability::MaybeIncorrect
                 };
 
+                // This is a duplicate of what's happening in clippy_lints::methods::method_call,
+                // which isn't ideal, We want to get the method call span,
+                // but prefer to avoid changing the signature of the function itself.
                 if let hir::ExprKind::MethodCall(_, _, span) = expr.kind {
                     span_lint_and_then(cx, UNNECESSARY_LAZY_EVALUATIONS, expr.span, msg, |diag| {
                         diag.span_suggestion(