mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Fix ConstParam HasSource impl and implement TryToNav not Nav
This commit is contained in:
parent
887028fcf5
commit
40cd6cdf67
2 changed files with 8 additions and 8 deletions
|
@ -142,8 +142,8 @@ impl HasSource for LifetimeParam {
|
|||
|
||||
impl HasSource for ConstParam {
|
||||
type Ast = ast::ConstParam;
|
||||
fn source(self, db: &dyn HirDatabase) -> InFile<Self::Ast> {
|
||||
fn source(self, db: &dyn HirDatabase) -> Option<InFile<Self::Ast>> {
|
||||
let child_source = self.id.parent.child_source(db.upcast());
|
||||
child_source.map(|it| it[self.id.local_id].clone())
|
||||
Some(child_source.map(|it| it[self.id.local_id].clone()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue