Move Ty::builtin_deref

This commit is contained in:
Lukas Wirth 2021-04-07 13:06:48 +02:00
parent a8f1e41f0f
commit e3a5c15d18
2 changed files with 9 additions and 9 deletions

View file

@ -199,14 +199,6 @@ impl Ty {
}
}
fn builtin_deref(&self) -> Option<Ty> {
match self.kind(&Interner) {
TyKind::Ref(.., ty) => Some(ty.clone()),
TyKind::Raw(.., ty) => Some(ty.clone()),
_ => None,
}
}
/// Returns the type parameters of this type if it has some (i.e. is an ADT
/// or function); so if `self` is `Option<u32>`, this returns the `u32`.
pub fn substs(&self) -> Option<&Substitution> {