aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/types.rs')
-rw-r--r--crates/hir_ty/src/types.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/hir_ty/src/types.rs b/crates/hir_ty/src/types.rs
index dc64e6e2b..bd89991dc 100644
--- a/crates/hir_ty/src/types.rs
+++ b/crates/hir_ty/src/types.rs
@@ -29,6 +29,12 @@ pub struct ProjectionTy {
29 pub substitution: Substitution, 29 pub substitution: Substitution,
30} 30}
31 31
32impl ProjectionTy {
33 pub fn self_type_parameter(&self, interner: &Interner) -> &Ty {
34 &self.substitution.interned()[0].assert_ty_ref(interner)
35 }
36}
37
32#[derive(Clone, PartialEq, Eq, Debug, Hash)] 38#[derive(Clone, PartialEq, Eq, Debug, Hash)]
33pub struct DynTy { 39pub struct DynTy {
34 /// The unknown self type. 40 /// The unknown self type.