Skip to content

Commit 8103a10

Browse files
committed
update assist to include more literals
1 parent 094c1e7 commit 8103a10

File tree

5 files changed

+727
-299
lines changed

5 files changed

+727
-299
lines changed

crates/hir/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3494,6 +3494,14 @@ impl Type {
34943494
}
34953495
}
34963496

3497+
pub fn is_scalar(&self) -> bool {
3498+
matches!(self.ty.kind(Interner), TyKind::Scalar(_))
3499+
}
3500+
3501+
pub fn is_tuple(&self) -> bool {
3502+
matches!(self.ty.kind(Interner), TyKind::Tuple(..))
3503+
}
3504+
34973505
pub fn remove_ref(&self) -> Option<Type> {
34983506
match &self.ty.kind(Interner) {
34993507
TyKind::Ref(.., ty) => Some(self.derived(ty.clone())),

0 commit comments

Comments
 (0)