mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 00:47:16 +00:00
Add some comments
This commit is contained in:
parent
6a3dbe4798
commit
bd888d4354
1 changed files with 3 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue