aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-02-01 16:45:43 +0000
committerFlorian Diebold <[email protected]>2020-02-07 17:28:10 +0000
commitc6654fd4a70ef149a842e42dc9ef86838148fbe7 (patch)
tree15373c50a5b205ecd3647c7ba7d76c18857056bf /crates/ra_hir_ty/src
parented25cf70d5e0df9c7a33deb503ea14c2d97bd7a7 (diff)
Fix APIT
Diffstat (limited to 'crates/ra_hir_ty/src')
-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