From 2af067b391bf37950cf1d3f1af863d931b385af5 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 16 Feb 2019 21:21:36 +0100 Subject: Resolve impl generic params --- crates/ra_hir/src/impl_block.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ra_hir/src/impl_block.rs b/crates/ra_hir/src/impl_block.rs index 7d862882d..7ecf8c368 100644 --- a/crates/ra_hir/src/impl_block.rs +++ b/crates/ra_hir/src/impl_block.rs @@ -106,7 +106,9 @@ impl ImplBlock { pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { let r = self.module().resolver(db); - // TODO: add generics + // add generic params, if present + let p = self.generic_params(db); + let r = if !p.params.is_empty() { r.push_generic_params_scope(p) } else { r }; let r = r.push_impl_block_scope(self.clone()); r } -- cgit v1.2.3