diff options
Diffstat (limited to 'clippy_lints/src/methods/iter_next_slice.rs')
| -rw-r--r-- | clippy_lints/src/methods/iter_next_slice.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/methods/iter_next_slice.rs b/clippy_lints/src/methods/iter_next_slice.rs index 6954da67e32..d053ff56756 100644 --- a/clippy_lints/src/methods/iter_next_slice.rs +++ b/clippy_lints/src/methods/iter_next_slice.rs @@ -64,6 +64,6 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>, cal } fn is_vec_or_array<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) -> bool { - is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(expr), sym::vec_type) + is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(expr), sym::Vec) || matches!(&cx.typeck_results().expr_ty(expr).peel_refs().kind(), ty::Array(_, _)) } |
