mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 06:03:16 +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 {
|
pub fn is_primitive(ty: Ty<'_>) -> bool {
|
||||||
match ty.kind() {
|
match ty.kind() {
|
||||||
ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Str => true,
|
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,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -212,7 +212,7 @@ pub fn is_primitive(ty: Ty<'_>) -> bool {
|
|||||||
pub fn is_array(ty: Ty<'_>) -> bool {
|
pub fn is_array(ty: Ty<'_>) -> bool {
|
||||||
match ty.kind() {
|
match ty.kind() {
|
||||||
ty::Array(..) | ty::Slice(..) => true,
|
ty::Array(..) | ty::Slice(..) => true,
|
||||||
ty::Ref(_, t, _) => is_array(t),
|
ty::Ref(_, t, _) => is_array(*t),
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user