diff options
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/has_source.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 { | |||
142 | 142 | ||
143 | impl HasSource for ConstParam { | 143 | impl HasSource for ConstParam { |
144 | type Ast = ast::ConstParam; | 144 | type Ast = ast::ConstParam; |
145 | fn source(self, db: &dyn HirDatabase) -> InFile<Self::Ast> { | 145 | fn source(self, db: &dyn HirDatabase) -> Option<InFile<Self::Ast>> { |
146 | let child_source = self.id.parent.child_source(db.upcast()); | 146 | let child_source = self.id.parent.child_source(db.upcast()); |
147 | child_source.map(|it| it[self.id.local_id].clone()) | 147 | Some(child_source.map(|it| it[self.id.local_id].clone())) |
148 | } | 148 | } |
149 | } | 149 | } |