Skip to content

Commit c6654fd

Browse files
committed
Fix APIT
1 parent ed25cf7 commit c6654fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/ra_hir_ty/src/lower.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use crate::{
3131
TraitEnvironment, TraitRef, Ty, TypeCtor,
3232
};
3333
use hir_def::TypeParamId;
34+
use hir_def::generics::TypeParamProvenance;
3435

3536
#[derive(Debug)]
3637
pub struct TyLoweringContext<'a, DB: HirDatabase> {
@@ -149,6 +150,7 @@ impl Ty {
149150
let generics = generics(ctx.db, def);
150151
let param = generics
151152
.iter()
153+
.filter(|(_, data)| data.provenance == TypeParamProvenance::ArgumentImplTrait)
152154
.nth(idx as usize)
153155
.map_or(Ty::Unknown, |(id, _)| Ty::Param(id));
154156
param

0 commit comments

Comments
 (0)