aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2020-12-14 16:11:27 +0000
committerLukas Wirth <[email protected]>2020-12-15 17:21:01 +0000
commit2c67a4abe47ead6a00ce1b33ccc3d3bfcaaf0983 (patch)
tree05b8dced1ec7bb9580643f6d7606d3fa4eb3cf68 /crates/hir/src
parent34f7b5383af61d8896c97e407888cfde2ba35350 (diff)
Change HasChildSource::ChildId assoc item to generic param
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/has_source.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir/src/has_source.rs b/crates/hir/src/has_source.rs
index 1e64a1614..552c8e433 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}