summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-5917.rs
blob: 6ab7081cf8843ec083c716fe1dac2201cd93755a (plain)
1
2
3
4
5
6
7
8
9
// run-pass
#![allow(non_upper_case_globals)]

struct T (&'static [isize]);
static t : T = T (&[5, 4, 3]);
pub fn main () {
    let T(ref v) = t;
    assert_eq!(v[0], 5);
}