Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/lib.rs')
| -rw-r--r-- | crates/hir-ty/src/lib.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crates/hir-ty/src/lib.rs b/crates/hir-ty/src/lib.rs index 536c81ab03..094a3e5326 100644 --- a/crates/hir-ty/src/lib.rs +++ b/crates/hir-ty/src/lib.rs @@ -61,7 +61,7 @@ use la_arena::Idx; use mir::{MirEvalError, VTableMap}; use rustc_hash::{FxBuildHasher, FxHashMap, FxHashSet}; use rustc_type_ir::{ - TypeSuperVisitable, TypeVisitableExt, UpcastFrom, + BoundVarIndexKind, TypeSuperVisitable, TypeVisitableExt, UpcastFrom, inherent::{IntoKind, SliceLike, Ty as _}, }; use syntax::ast::{ConstArg, make}; @@ -405,7 +405,7 @@ where )) } TyKind::Infer(_) => error(), - TyKind::Bound(index, _) if index > self.binder => error(), + TyKind::Bound(BoundVarIndexKind::Bound(index), _) if index > self.binder => error(), _ => t.try_super_fold_with(self), } } @@ -432,7 +432,9 @@ where Ok(Const::new_bound(self.interner, self.binder, BoundConst { var })) } ConstKind::Infer(_) => error(), - ConstKind::Bound(index, _) if index > self.binder => error(), + ConstKind::Bound(BoundVarIndexKind::Bound(index), _) if index > self.binder => { + error() + } _ => ct.try_super_fold_with(self), } } @@ -454,7 +456,9 @@ where )) } RegionKind::ReVar(_) => error(), - RegionKind::ReBound(index, _) if index > self.binder => error(), + RegionKind::ReBound(BoundVarIndexKind::Bound(index), _) if index > self.binder => { + error() + } _ => Ok(region), } } |