feat: add remove_slice
to hir::Type
This commit is contained in:
parent
9549753352
commit
34e3ea8cc8
@ -3224,6 +3224,13 @@ pub fn remove_ref(&self) -> Option<Type> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_slice(&self) -> Option<Type> {
|
||||
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())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user