From c4a3ccde7816e17e99b489b9b2242b6ba185047c Mon Sep 17 00:00:00 2001 From: Jaeyong Sung Date: Sat, 5 Mar 2022 21:49:36 +0900 Subject: [PATCH] fix lint errors --- clippy_lints/src/only_used_in_recursion.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/only_used_in_recursion.rs b/clippy_lints/src/only_used_in_recursion.rs index bbf3f24566b..0d7e52e1d62 100644 --- a/clippy_lints/src/only_used_in_recursion.rs +++ b/clippy_lints/src/only_used_in_recursion.rs @@ -204,7 +204,7 @@ impl<'tcx> LateLintPass<'tcx> for OnlyUsedInRecursion { pub fn is_primitive(ty: Ty<'_>) -> bool { match ty.kind() { ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Str => true, - ty::Ref(_, t, _) => is_primitive(t), + ty::Ref(_, t, _) => is_primitive(*t), _ => false, } } @@ -212,7 +212,7 @@ pub fn is_primitive(ty: Ty<'_>) -> bool { pub fn is_array(ty: Ty<'_>) -> bool { match ty.kind() { ty::Array(..) | ty::Slice(..) => true, - ty::Ref(_, t, _) => is_array(t), + ty::Ref(_, t, _) => is_array(*t), _ => false, } }