rust/src/test/run-pass/const-vecs-and-slices.rs
2012-10-20 17:50:46 -07:00

11 lines
218 B
Rust

const x : [int * 4] = [1,2,3,4];
const y : &[int] = &[1,2,3,4];
fn main() {
io::println(fmt!("%?", x[1]));
io::println(fmt!("%?", y[1]));
assert x[1] == 2;
assert x[3] == 4;
assert x[3] == y[3];
}