Skip to content

Commit 4d9af83

Browse files
Merge pull request #21879 from cuiweixie/fix/generics-type-or-const-idx-bound
fix: Correct type_or_const param index bound in debug_assert
2 parents 9253d39 + 834ad9c commit 4d9af83

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/hir-ty/src/generics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl Generics {
185185
if param.parent == self.def {
186186
let idx = param.local_id.into_raw().into_u32() as usize;
187187
debug_assert!(
188-
idx <= self.params.len_type_or_consts(),
188+
idx < self.params.len_type_or_consts(),
189189
"idx: {} len: {}",
190190
idx,
191191
self.params.len_type_or_consts()

0 commit comments

Comments
 (0)