-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)
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.
Metadata
Metadata
Assignees
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)