Check existing uses of unwrap_usize
for ty::Array
#61381
Labels
A-const-generics
Area: const generics (parameters and arguments)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
F-const_generics
`#![feature(const_generics)]`
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Generally, we should be using
assert_usize
, which will fail gracefully if we have a generic parameter as an array length instead, and handling that case specially. Usingunwrap_usize
has caused issues in the past: #61380.ICEs resulting from this issue have the form:
The text was updated successfully, but these errors were encountered: