update assist to include more literals

This commit is contained in:
Viktor Lott 2023-05-31 00:14:38 +02:00
parent 094c1e7b86
commit 8103a10a78
5 changed files with 727 additions and 299 deletions

View file

@ -3494,6 +3494,14 @@ impl Type {
}
}
pub fn is_scalar(&self) -> bool {
matches!(self.ty.kind(Interner), TyKind::Scalar(_))
}
pub fn is_tuple(&self) -> bool {
matches!(self.ty.kind(Interner), TyKind::Tuple(..))
}
pub fn remove_ref(&self) -> Option<Type> {
match &self.ty.kind(Interner) {
TyKind::Ref(.., ty) => Some(self.derived(ty.clone())),