aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-12-15 17:22:03 +0000
committerGitHub <[email protected]>2020-12-15 17:22:03 +0000
commiteb9ba457b0126bd45c45ef751e92ccfdc5fdc206 (patch)
tree5af185ffaa39f285ce85aaccb2eb6bb5f532e26c /crates/hir/src
parentbd4c352831662762ee7a66da77ec9adf623b0a0a (diff)
parent2c67a4abe47ead6a00ce1b33ccc3d3bfcaaf0983 (diff)
Merge #6879
6879: Change HasChildSource::ChildId assoc item to generic param r=matklad a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
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 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}