From 2c67a4abe47ead6a00ce1b33ccc3d3bfcaaf0983 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 14 Dec 2020 17:11:27 +0100 Subject: Change HasChildSource::ChildId assoc item to generic param --- 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 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 { type Ast = Either; fn source(self, db: &dyn HirDatabase) -> InFile { let child_source = self.id.parent.child_source(db.upcast()); - child_source.map(|it| it.type_params[self.id.local_id].clone()) + child_source.map(|it| it[self.id.local_id].clone()) } } @@ -137,6 +137,6 @@ impl HasSource for LifetimeParam { type Ast = ast::LifetimeParam; fn source(self, db: &dyn HirDatabase) -> InFile { let child_source = self.id.parent.child_source(db.upcast()); - child_source.map(|it| it.lifetime_params[self.id.local_id].clone()) + child_source.map(|it| it[self.id.local_id].clone()) } } -- cgit v1.2.3