aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/src/lower.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs
index d60b59433..42367b181 100644
--- a/crates/ra_hir_ty/src/lower.rs
+++ b/crates/ra_hir_ty/src/lower.rs
@@ -31,6 +31,7 @@ use crate::{
31 TraitEnvironment, TraitRef, Ty, TypeCtor, 31 TraitEnvironment, TraitRef, Ty, TypeCtor,
32}; 32};
33use hir_def::TypeParamId; 33use hir_def::TypeParamId;
34use hir_def::generics::TypeParamProvenance;
34 35
35#[derive(Debug)] 36#[derive(Debug)]
36pub struct TyLoweringContext<'a, DB: HirDatabase> { 37pub struct TyLoweringContext<'a, DB: HirDatabase> {
@@ -149,6 +150,7 @@ impl Ty {
149 let generics = generics(ctx.db, def); 150 let generics = generics(ctx.db, def);
150 let param = generics 151 let param = generics
151 .iter() 152 .iter()
153 .filter(|(_, data)| data.provenance == TypeParamProvenance::ArgumentImplTrait)
152 .nth(idx as usize) 154 .nth(idx as usize)
153 .map_or(Ty::Unknown, |(id, _)| Ty::Param(id)); 155 .map_or(Ty::Unknown, |(id, _)| Ty::Param(id));
154 param 156 param