rust/tests/pass/issue-5917.rs
2022-06-01 10:53:38 -04: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);
}