Use ConstArg for array lengths

This commit is contained in:
Noah Lev
2024-06-04 18:24:08 -07:00
parent 8818708a31
commit 67fccb7045
14 changed files with 77 additions and 45 deletions

View File

@@ -2342,10 +2342,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
"using `_` for array lengths is unstable",
)
.stash(c.value.span, StashKey::UnderscoreForArrayLengths);
hir::ArrayLen::Body(self.lower_anon_const_to_anon_const(c))
hir::ArrayLen::Body(self.lower_anon_const_to_const_arg(c))
}
}
_ => hir::ArrayLen::Body(self.lower_anon_const_to_anon_const(c)),
_ => hir::ArrayLen::Body(self.lower_anon_const_to_const_arg(c)),
}
}