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 107ad0690..04845037f 100644 --- a/crates/hir/src/has_source.rs +++ b/crates/hir/src/has_source.rs | |||
@@ -129,7 +129,7 @@ impl HasSource for TypeParam { | |||
129 | type Ast = Either<ast::Trait, ast::TypeParam>; | 129 | type Ast = Either<ast::Trait, ast::TypeParam>; |
130 | fn source(self, db: &dyn HirDatabase) -> InFile<Self::Ast> { | 130 | fn source(self, db: &dyn HirDatabase) -> InFile<Self::Ast> { |
131 | let child_source = self.id.parent.child_source(db.upcast()); | 131 | let child_source = self.id.parent.child_source(db.upcast()); |
132 | child_source.map(|it| it.type_params[self.id.local_id].clone()) | 132 | child_source.map(|it| it[self.id.local_id].clone()) |
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
@@ -137,6 +137,6 @@ impl HasSource for LifetimeParam { | |||
137 | type Ast = ast::LifetimeParam; | 137 | type Ast = ast::LifetimeParam; |
138 | fn source(self, db: &dyn HirDatabase) -> InFile<Self::Ast> { | 138 | fn source(self, db: &dyn HirDatabase) -> InFile<Self::Ast> { |
139 | let child_source = self.id.parent.child_source(db.upcast()); | 139 | let child_source = self.id.parent.child_source(db.upcast()); |
140 | child_source.map(|it| it.lifetime_params[self.id.local_id].clone()) | 140 | child_source.map(|it| it[self.id.local_id].clone()) |
141 | } | 141 | } |
142 | } | 142 | } |