We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 602bcf3 commit 0edd5f8Copy full SHA for 0edd5f8
clippy_lints/src/methods/into_iter_on_ref.rs
@@ -1,6 +1,6 @@
1
use clippy_utils::diagnostics::span_lint_and_sugg;
2
+use clippy_utils::is_trait_method;
3
use clippy_utils::ty::has_iter_method;
-use clippy_utils::{match_trait_method, paths};
4
use if_chain::if_chain;
5
use rustc_errors::Applicability;
6
use rustc_hir as hir;
@@ -22,7 +22,7 @@ pub(super) fn check(
22
if_chain! {
23
if let ty::Ref(..) = self_ty.kind();
24
if method_name == sym::into_iter;
25
- if match_trait_method(cx, expr, &paths::INTO_ITERATOR);
+ if is_trait_method(cx, expr, sym::IntoIterator);
26
if let Some((kind, method_name)) = ty_has_iter_method(cx, self_ty);
27
then {
28
span_lint_and_sugg(
0 commit comments