On 3/24/14 2:45 AM, Richo Healey wrote:
I get a compile error:
src/repository.rs:24:17: 24:54 error: expected constant expr for vector
length: non-constant path in constant expr
src/repository.rs:24     cvar_cache: [GitCvarValue, ..
GIT_CVAR_CACHE_MAX] // git_cvar_value cvar_cache[GIT_CVAR_CACHE_MAX];

This seems to me like it should work. The value of that enum is a
compile and
(if I'm reading the docs surrounding enums correctly) run time constant.

Can you use `[GitCvarValue, ..GIT_CVAR_CACHE_MAX as uint]`?

Patrick

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to