rust/src/test/run-pass/issue-2748-b.rs
2012-07-05 14:48:23 -07:00

9 lines
161 B
Rust

fn thing(x: &[int]) -> &[int] { x }
fn main() {
let x = &[1,2,3];
let y = x;
let z = thing(x);
assert(z[2] == x[2]);
assert(z[1] == y[1]);
}