Test for a Salsa bug

This commit is contained in:
Florian Diebold 2021-03-20 15:26:42 +01:00
parent 0d40ff5e62
commit 0623bb4d71
3 changed files with 124 additions and 0 deletions

View file

@ -106,6 +106,10 @@ impl ProjectionTy {
}
}
pub fn self_type_parameter(&self) -> &Ty {
&self.substitution[0]
}
fn trait_(&self, db: &dyn HirDatabase) -> TraitId {
match from_assoc_type_id(self.associated_ty_id).lookup(db.upcast()).container {
AssocContainerId::TraitId(it) => it,