diff options
author | Florian Diebold <[email protected]> | 2021-04-07 19:41:52 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-07 19:41:52 +0100 |
commit | 9b4ecd3723c0184706d1276759846ebf3fdff944 (patch) | |
tree | e32e0458498407d8a914b468deabab667b7caeed /crates/hir_ty/src/types.rs | |
parent | 6777a4975d6a88928fda3e3b3f0bb05d98c61060 (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.rs | 8 |
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 | ||
32 | impl ProjectionTy { | 32 | impl 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 | ||
415 | impl TraitRef { | 415 | impl 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 | ||