Mark (method-)calls with never type as exit points
This commit is contained in:
@@ -2075,10 +2075,15 @@ impl Type {
|
||||
pub fn is_unit(&self) -> bool {
|
||||
matches!(self.ty.kind(&Interner), TyKind::Tuple(0, ..))
|
||||
}
|
||||
|
||||
pub fn is_bool(&self) -> bool {
|
||||
matches!(self.ty.kind(&Interner), TyKind::Scalar(Scalar::Bool))
|
||||
}
|
||||
|
||||
pub fn is_never(&self) -> bool {
|
||||
matches!(self.ty.kind(&Interner), TyKind::Never)
|
||||
}
|
||||
|
||||
pub fn is_mutable_reference(&self) -> bool {
|
||||
matches!(self.ty.kind(&Interner), TyKind::Ref(hir_ty::Mutability::Mut, ..))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user