Closed
Description
These error markers point to nothing, which is less than ideal. The note
does at least help somewhat.
error[E0080]: constant evaluation error
--> src/lib.rs:5:30
|
5 |
| ^^^^^^^^^^^ unimplemented constant expression: enum variants
|
note: for repeat count here
--> examples/main.rs:4:22
|
4 | let test_x = [0; constenum::CRATE_ONE];
| ^^^^^^^^^^^^^^^^^^^^
src/lib.rs
pub enum MyEnum {
ONE = 1,
}
pub const CRATE_ONE: usize = MyEnum::ONE as usize;
examples/main.rs
extern crate constenum;
fn main() {
let test_x = [0; constenum::CRATE_ONE];
}
Execute via cargo build --example=main
rustc 1.14.0 (e8a012324 2016-12-16)
- Originally from Stack Overflow
Metadata
Metadata
Assignees
Labels
No labels