diff options
| author | kyoto7250 <50972773+kyoto7250@users.noreply.github.com> | 2022-06-09 22:34:16 +0900 |
|---|---|---|
| committer | kyoto7250 <50972773+kyoto7250@users.noreply.github.com> | 2022-06-27 08:11:58 +0900 |
| commit | fd629c0cde26d727fbc19580455a4efd04a84828 (patch) | |
| tree | c2ce2350710d35fdb302b2f777d71d05ef87944f /clippy_lints | |
| parent | 3953c530f4b2cfbe00864ae824fe4a543066a7f4 (diff) | |
| download | rust-fd629c0cde26d727fbc19580455a4efd04a84828.tar.gz rust-fd629c0cde26d727fbc19580455a4efd04a84828.zip | |
check method
Diffstat (limited to 'clippy_lints')
| -rw-r--r-- | clippy_lints/src/use_retain.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/use_retain.rs b/clippy_lints/src/use_retain.rs index b55e1006aac..b6b6dc572c1 100644 --- a/clippy_lints/src/use_retain.rs +++ b/clippy_lints/src/use_retain.rs @@ -102,7 +102,7 @@ fn check_iter( if_chain! { if let hir::ExprKind::MethodCall(_, [filter_expr], _) = &target_expr.kind; if let Some(copied_def_id) = cx.typeck_results().type_dependent_def_id(target_expr.hir_id); - if match_def_path(cx, copied_def_id, &paths::CORE_ITER_COPIED); + if match_def_path(cx, copied_def_id, &paths::CORE_ITER_COPIED) || match_def_path(cx, copied_def_id, &paths::CORE_ITER_CLONED); if let hir::ExprKind::MethodCall(_, [iter_expr, _], _) = &filter_expr.kind; if let Some(filter_def_id) = cx.typeck_results().type_dependent_def_id(filter_expr.hir_id); |
