From 40cd6cdf67dcfad89a80ff3a662bec2dfd983d67 Mon Sep 17 00:00:00 2001 From: Nick Spain Date: Sat, 2 Jan 2021 22:11:25 +1100 Subject: Fix ConstParam HasSource impl and implement TryToNav not Nav --- crates/hir/src/has_source.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir/src/has_source.rs') diff --git a/crates/hir/src/has_source.rs b/crates/hir/src/has_source.rs index 57baeb3cf..7c57d8378 100644 --- a/crates/hir/src/has_source.rs +++ b/crates/hir/src/has_source.rs @@ -142,8 +142,8 @@ impl HasSource for LifetimeParam { impl HasSource for ConstParam { type Ast = ast::ConstParam; - fn source(self, db: &dyn HirDatabase) -> InFile { + fn source(self, db: &dyn HirDatabase) -> Option> { 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())) } } -- cgit v1.2.3