rust/tests/run-pass/issue-5917.rs
2019-02-26 18:37:45 +00:00

8 lines
137 B
Rust

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