aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/types.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-07 19:41:52 +0100
committerFlorian Diebold <[email protected]>2021-04-07 19:41:52 +0100
commit9b4ecd3723c0184706d1276759846ebf3fdff944 (patch)
treee32e0458498407d8a914b468deabab667b7caeed /crates/hir_ty/src/types.rs
parent6777a4975d6a88928fda3e3b3f0bb05d98c61060 (diff)
Fix return type of `self_type_parameter`
Diffstat (limited to 'crates/hir_ty/src/types.rs')
-rw-r--r--crates/hir_ty/src/types.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_ty/src/types.rs b/crates/hir_ty/src/types.rs
index c25bc2d6a..72be7e04f 100644
--- a/crates/hir_ty/src/types.rs
+++ b/crates/hir_ty/src/types.rs
@@ -30,8 +30,8 @@ pub struct ProjectionTy {
30} 30}
31 31
32impl ProjectionTy { 32impl ProjectionTy {
33 pub fn self_type_parameter(&self, interner: &Interner) -> &Ty { 33 pub fn self_type_parameter(&self, interner: &Interner) -> Ty {
34 &self.substitution.interned()[0].assert_ty_ref(interner) 34 self.substitution.interned()[0].assert_ty_ref(interner).clone()
35 } 35 }
36} 36}
37 37
@@ -413,8 +413,8 @@ pub struct TraitRef {
413} 413}
414 414
415impl TraitRef { 415impl TraitRef {
416 pub fn self_type_parameter(&self, interner: &Interner) -> &Ty { 416 pub fn self_type_parameter(&self, interner: &Interner) -> Ty {
417 &self.substitution.at(interner, 0).assert_ty_ref(interner) 417 self.substitution.at(interner, 0).assert_ty_ref(interner).clone()
418 } 418 }
419} 419}
420 420