aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/lib.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-04-07 12:06:48 +0100
committerLukas Wirth <[email protected]>2021-04-07 12:06:48 +0100
commite3a5c15d18492f5b9f0c606f988b914918d29ef5 (patch)
treea07655d6998f941dd56960744fc009e0414e68c6 /crates/hir_ty/src/lib.rs
parenta8f1e41f0f15fee02a73850db559752a9124d014 (diff)
Move Ty::builtin_deref
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r--crates/hir_ty/src/lib.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs
index 5c83a508d..ae3987752 100644
--- a/crates/hir_ty/src/lib.rs
+++ b/crates/hir_ty/src/lib.rs
@@ -199,14 +199,6 @@ impl Ty {
199 } 199 }
200 } 200 }
201 201
202 fn builtin_deref(&self) -> Option<Ty> {
203 match self.kind(&Interner) {
204 TyKind::Ref(.., ty) => Some(ty.clone()),
205 TyKind::Raw(.., ty) => Some(ty.clone()),
206 _ => None,
207 }
208 }
209
210 /// Returns the type parameters of this type if it has some (i.e. is an ADT 202 /// Returns the type parameters of this type if it has some (i.e. is an ADT
211 /// or function); so if `self` is `Option<u32>`, this returns the `u32`. 203 /// or function); so if `self` is `Option<u32>`, this returns the `u32`.
212 pub fn substs(&self) -> Option<&Substitution> { 204 pub fn substs(&self) -> Option<&Substitution> {