Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/lower.rs')
-rw-r--r--crates/hir-ty/src/mir/lower.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/hir-ty/src/mir/lower.rs b/crates/hir-ty/src/mir/lower.rs
index ea311cadb7..c65dfd3285 100644
--- a/crates/hir-ty/src/mir/lower.rs
+++ b/crates/hir-ty/src/mir/lower.rs
@@ -495,9 +495,11 @@ impl<'ctx> MirLowerCtx<'ctx> {
ty,
value: chalk_ir::ConstValue::BoundVar(BoundVar::new(
DebruijnIndex::INNERMOST,
- gen.param_idx(p.into()).ok_or(MirLowerError::TypeError(
- "fail to lower const generic param",
- ))?,
+ gen.type_or_const_param_idx(p.into()).ok_or(
+ MirLowerError::TypeError(
+ "fail to lower const generic param",
+ ),
+ )?,
)),
}
.intern(Interner),