Skip to content

Commit 7785869

Browse files
committed
Add fn parent(self, db) -> GenericDef to hir::TypeParam
1 parent b8cc805 commit 7785869

File tree

1 file changed

+4
-0
lines changed
  • src/tools/rust-analyzer/crates/hir/src

1 file changed

+4
-0
lines changed

src/tools/rust-analyzer/crates/hir/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4150,6 +4150,10 @@ impl TypeParam {
41504150
self.merge().name(db)
41514151
}
41524152

4153+
pub fn parent(self, _db: &dyn HirDatabase) -> GenericDef {
4154+
self.id.parent().into()
4155+
}
4156+
41534157
pub fn module(self, db: &dyn HirDatabase) -> Module {
41544158
self.id.parent().module(db).into()
41554159
}

0 commit comments

Comments
 (0)