]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/clippy_lints/src/methods/suspicious_map.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / clippy_lints / src / methods / suspicious_map.rs
CommitLineData
f20569fa
XL
1use crate::utils::span_lint_and_help;
2use rustc_hir as hir;
3use rustc_lint::LateContext;
4
5use super::SUSPICIOUS_MAP;
6
7pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>) {
8 span_lint_and_help(
9 cx,
10 SUSPICIOUS_MAP,
11 expr.span,
12 "this call to `map()` won't have an effect on the call to `count()`",
13 None,
14 "make sure you did not confuse `map` with `filter` or `for_each`",
15 );
16}