Fix APIT
This commit is contained in:
parent
ed25cf70d5
commit
c6654fd4a7
1 changed files with 2 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ use crate::{
|
|||
TraitEnvironment, TraitRef, Ty, TypeCtor,
|
||||
};
|
||||
use hir_def::TypeParamId;
|
||||
use hir_def::generics::TypeParamProvenance;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct TyLoweringContext<'a, DB: HirDatabase> {
|
||||
|
|
@ -149,6 +150,7 @@ impl Ty {
|
|||
let generics = generics(ctx.db, def);
|
||||
let param = generics
|
||||
.iter()
|
||||
.filter(|(_, data)| data.provenance == TypeParamProvenance::ArgumentImplTrait)
|
||||
.nth(idx as usize)
|
||||
.map_or(Ty::Unknown, |(id, _)| Ty::Param(id));
|
||||
param
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue