blob: b7463366b8997e61159c59b25bde212f41ef3f85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//! Various extensions traits for Chalk types.
use crate::{Interner, Ty, TyKind};
pub trait TyExt {
fn is_unit(&self) -> bool;
}
impl TyExt for Ty {
fn is_unit(&self) -> bool {
matches!(self.kind(&Interner), TyKind::Tuple(0, _))
}
}
|