diff options
author | Laurențiu Nicola <[email protected]> | 2021-04-05 15:37:24 +0100 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2021-04-05 15:37:24 +0100 |
commit | aefcbf275804f558ab18e83bfc8869187713b4ad (patch) | |
tree | acce29c3d04b16434a3d031c8b0d698c7707dc97 /crates/hir_ty/src/lib.rs | |
parent | fab1c066464022613729a6d714dc83b7d698ece5 (diff) |
Pass interner to ProjectionTy::self_type_parameter
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r-- | crates/hir_ty/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs index d1513df1f..80dd7aaca 100644 --- a/crates/hir_ty/src/lib.rs +++ b/crates/hir_ty/src/lib.rs | |||
@@ -78,8 +78,8 @@ impl ProjectionTy { | |||
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | pub fn self_type_parameter(&self) -> &Ty { | 81 | pub fn self_type_parameter(&self, interner: &Interner) -> &Ty { |
82 | &self.substitution.interned()[0].assert_ty_ref(&Interner) | 82 | &self.substitution.interned()[0].assert_ty_ref(interner) |
83 | } | 83 | } |
84 | 84 | ||
85 | fn trait_(&self, db: &dyn HirDatabase) -> TraitId { | 85 | fn trait_(&self, db: &dyn HirDatabase) -> TraitId { |
@@ -477,7 +477,7 @@ impl Ty { | |||
477 | WhereClause::AliasEq(AliasEq { | 477 | WhereClause::AliasEq(AliasEq { |
478 | alias: AliasTy::Projection(proj), | 478 | alias: AliasTy::Projection(proj), |
479 | ty: _, | 479 | ty: _, |
480 | }) => proj.self_type_parameter() == self, | 480 | }) => proj.self_type_parameter(&Interner) == self, |
481 | _ => false, | 481 | _ => false, |
482 | }) | 482 | }) |
483 | .collect_vec(); | 483 | .collect_vec(); |