Skip to content

Commit bd888d4

Browse files
committed
Add some comments
1 parent 6a3dbe4 commit bd888d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clippy_lints/src/methods/unnecessary_lazy_eval.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ pub(super) fn check<'tcx>(
4848
Applicability::MaybeIncorrect
4949
};
5050

51+
// This is a duplicate of what's happening in clippy_lints::methods::method_call,
52+
// which isn't ideal, We want to get the method call span,
53+
// but prefer to avoid changing the signature of the function itself.
5154
if let hir::ExprKind::MethodCall(_, _, span) = expr.kind {
5255
span_lint_and_then(cx, UNNECESSARY_LAZY_EVALUATIONS, expr.span, msg, |diag| {
5356
diag.span_suggestion(

0 commit comments

Comments
 (0)