diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 25c07a2fbd3..866641202cc 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -3224,6 +3224,13 @@ pub fn remove_ref(&self) -> Option { } } + pub fn remove_slice(&self) -> Option { + match &self.ty.kind(Interner) { + TyKind::Slice(ty) => Some(self.derived(ty.clone())), + _ => None, + } + } + pub fn strip_references(&self) -> Type { self.derived(self.ty.strip_references().clone()) }