Merge pull request #20046 from regexident/type-param-parent-getter

Add `fn parent(self, db) -> GenericDef` to `hir::TypeParam`
This commit is contained in:
Florian Diebold 2025-06-20 07:41:04 +00:00 committed by GitHub
commit b0552d779f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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()
}