Closed
Description
This code
#![feature(const_generics)]
#[derive(Debug)]
struct X<const N: usize> {
a: [u32; N],
}
leads to
--> src/lib.rs:1:12
|
1 | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
error[E0107]: wrong number of const arguments: expected 1, found 0
thread 'rustc' panicked at 'assertion failed: `(left == right)`
left: `[type error]`,
right: `usize`', src/librustc/ty/sty.rs:2279:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: aborting due to previous error
For more information about this error, try `rustc --explain E0107`.
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
It doesn't seem Debug
related, since the same happens for deriving Copy
.