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.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/hir-ty/src/mir/lower.rs b/crates/hir-ty/src/mir/lower.rs index d16e1b0d59..9c9cf0ac0b 100644 --- a/crates/hir-ty/src/mir/lower.rs +++ b/crates/hir-ty/src/mir/lower.rs @@ -567,10 +567,7 @@ impl<'a, 'db> MirLowerCtx<'a, 'db> { not_supported!("owner without generic def id"); }; let generics = generics(self.db, def); - let index = generics - .type_or_const_param_idx(p.into()) - .ok_or(MirLowerError::TypeError("fail to lower const generic param"))? - as u32; + let index = generics.type_or_const_param_idx(p.into()); self.push_assignment( current, place, |