diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2021-02-26 21:17:29 -0600 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2021-03-01 09:04:11 -0600 |
| commit | 7984e60d9e1ee36b943cc72e4e7b33d05e6ee83d (patch) | |
| tree | 97599e7a9ebef7785557931c27431bfb73939961 /clippy_lints/src | |
| parent | 2b3a731e1cc8ad0e05149989ee40d4c1a407890b (diff) | |
Use diagnostic items in into_iter_collections
Diffstat (limited to 'clippy_lints/src')
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index f101b6476f5..5163074453b 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -24,7 +24,7 @@ use rustc_middle::ty::{self, TraitRef, Ty, TyS}; use rustc_semver::RustcVersion; use rustc_session::{declare_tool_lint, impl_lint_pass}; use rustc_span::source_map::Span; -use rustc_span::symbol::{sym, SymbolStr}; +use rustc_span::symbol::{sym, Symbol, SymbolStr}; use rustc_typeck::hir_ty_to_ty; use crate::consts::{constant, Constant}; @@ -3619,7 +3619,7 @@ fn lint_asref(cx: &LateContext<'_>, expr: &hir::Expr<'_>, call_name: &str, as_re } } -fn ty_has_iter_method(cx: &LateContext<'_>, self_ref_ty: Ty<'_>) -> Option<(&'static str, &'static str)> { +fn ty_has_iter_method(cx: &LateContext<'_>, self_ref_ty: Ty<'_>) -> Option<(Symbol, &'static str)> { has_iter_method(cx, self_ref_ty).map(|ty_name| { let mutbl = match self_ref_ty.kind() { ty::Ref(_, _, mutbl) => mutbl, |
