summary refs log tree commit diff
path: root/src/test/ui/issues/issue-2748-b.rs
blob: 8df735ac88ea6e374b292eeca7b763bb4007f5a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-pass

fn thing<'r>(x: &'r [isize]) -> &'r [isize] { x }

pub fn main() {
    let x = &[1,2,3];
    let y = x;
    let z = thing(x);
    assert_eq!(z[2], x[2]);
    assert_eq!(z[1], y[1]);
}