mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Add LifetimeParam resolving to Semantics
This commit is contained in:
parent
dbd0cfba53
commit
c6172f3f6d
8 changed files with 131 additions and 39 deletions
|
@ -1250,6 +1250,14 @@ impl LifetimeParam {
|
|||
let params = db.generic_params(self.id.parent);
|
||||
params.lifetimes[self.id.local_id].name.clone()
|
||||
}
|
||||
|
||||
pub fn module(self, db: &dyn HirDatabase) -> Module {
|
||||
self.id.parent.module(db.upcast()).into()
|
||||
}
|
||||
|
||||
pub fn parent(self, _db: &dyn HirDatabase) -> GenericDef {
|
||||
self.id.parent.into()
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: rename from `ImplDef` to `Impl`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue