If I had to guess, I'd say you're using a too old versions of rust.
In the future, one will be able to give a nice error when this happen (https://github.com/rust-lang/rust/issues/65262)
But now it's true that it can be hard to know what the problem is.
Yep, the two missing features are `usize::MAX` (stabilized in Rust 1.43, April 2020), and control flow in const fns (stabilized in Rust 1.46, August 2020).
In the future, one will be able to give a nice error when this happen (https://github.com/rust-lang/rust/issues/65262) But now it's true that it can be hard to know what the problem is.