Closed
Description
When compiling
static val: [u8, ..1] = [0];
fn main() {
match [1] {
val => (),
_ => ()
}
}
The error message
$ rustc errormsg.rs
errormsg.rs:1:25: 1:28 error: unsupported constant expr
errormsg.rs:1 static val: [u8, ..1] = [0];
^~~
points towards the definition of the constant and not the match statement which is misleading because the definition of the static value is perfectly fine but not its usage inside the match.
I am using rust 0.10.