diff options
author | Florian Diebold <[email protected]> | 2021-03-20 14:26:42 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-03-21 12:33:06 +0000 |
commit | 0623bb4d71725d6b07e8cef5665094581f951fc0 (patch) | |
tree | 748724d956efcb09be31d299dcecb90e1830142b /crates/hir_ty/src/lib.rs | |
parent | 0d40ff5e623b3670ce3e0e324ecbab3e5197aaeb (diff) |
Test for a Salsa bug
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r-- | crates/hir_ty/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs index c46529879..815bb8418 100644 --- a/crates/hir_ty/src/lib.rs +++ b/crates/hir_ty/src/lib.rs | |||
@@ -106,6 +106,10 @@ impl ProjectionTy { | |||
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
109 | pub fn self_type_parameter(&self) -> &Ty { | ||
110 | &self.substitution[0] | ||
111 | } | ||
112 | |||
109 | fn trait_(&self, db: &dyn HirDatabase) -> TraitId { | 113 | fn trait_(&self, db: &dyn HirDatabase) -> TraitId { |
110 | match from_assoc_type_id(self.associated_ty_id).lookup(db.upcast()).container { | 114 | match from_assoc_type_id(self.associated_ty_id).lookup(db.upcast()).container { |
111 | AssocContainerId::TraitId(it) => it, | 115 | AssocContainerId::TraitId(it) => it, |