Closed
Description
The following code used to compile on nightly, but now does not:
#![feature(const_in_array_repeat_expressions)]
struct T;
impl T {
const fn new() -> Self {
Self
}
}
const fn bar() -> [T; 2] {
[T::new(); 2]
}
Note that
static FOO: [T; 2] = [T::new(); 2];
still compiles. Adding #![feature(const_fn)]
doesn't affect this issue.
I think this regression was introduced in either #76807 or #76850