rust/src/test/run-pass/issue-2748-b.rs

9 lines
161 B
Rust
Raw Normal View History

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]);
}