diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index f41e7ee4c4c..bd1e8278d51 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -2507,6 +2507,10 @@ pub fn is_reference(&self) -> bool { matches!(self.ty.kind(Interner), TyKind::Ref(..)) } + pub fn is_slice(&self) -> bool { + matches!(self.ty.kind(Interner), TyKind::Slice(..)) + } + pub fn is_usize(&self) -> bool { matches!(self.ty.kind(Interner), TyKind::Scalar(Scalar::Uint(UintTy::Usize))) }