Add fn parent(self, db) -> GenericDef to hir::TypeParam

This commit is contained in:
Vincent Esche 2025-06-19 18:01:32 +02:00
parent df50136c23
commit 90f392108c

View file

@ -4150,6 +4150,10 @@ impl TypeParam {
self.merge().name(db)
}
pub fn parent(self, _db: &dyn HirDatabase) -> GenericDef {
self.id.parent().into()
}
pub fn module(self, db: &dyn HirDatabase) -> Module {
self.id.parent().module(db).into()
}