mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
Merge pull request #20046 from regexident/type-param-parent-getter
Add `fn parent(self, db) -> GenericDef` to `hir::TypeParam`
This commit is contained in:
commit
b0552d779f
@ -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()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user