#7601 introduces a should_pass/language/const_generics_array_in_reassignments tests with the following code snippet:
impl<T, const N: u64> DefaultSelf<T> for [T; N]
where
T: AbiEncode + PartialEq,
{
fn default_self(ref mut self, default: T) {
let mut i = 0;
while i < N {
self[i] = default; // <<<<---- This works as expected.
assert_eq(self[i], default); // <<<<---- This causes ICE.
i += 1;
}
}
}
The self[i] access in the assert_eq results in:
assert_eq(self[i], default);
^^^^ Internal compiler error: Unsupported array value for index expression.
#7601 introduces a
should_pass/language/const_generics_array_in_reassignmentstests with the following code snippet:The
self[i]access in theassert_eqresults in: