mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-09 22:37:34 +00:00
fix lint errors
This commit is contained in:
parent
2b0f9aba64
commit
c4a3ccde78
@ -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,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user