Closed
Description
The code:
#![feature(const_generics)]
struct Stack<const N: usize> {
stack: [u64; {N / 8}],
}
must be compiled but gives error:
error: constant expression depends on a generic parameter
--> src/lib.rs:4:5
|
4 | stack: [u64; {N / 8}],
| ^^^^^^^^^^^^^^^^^^^
|
= note: this may fail depending on what value the parameter takes
note: rustc 1.42.0-nightly (8a79d08fa 2020-01-27) running on x86_64-unknown-linux-gnu
It is the same as #61368, but not ICE.