rust/tests/pass/issues/issue-5917.rs

7 lines
132 B
Rust
Raw Normal View History

struct T(&'static [isize]);
static STATIC: T = T(&[5, 4, 3]);
pub fn main() {
2017-02-08 08:38:48 -06:00
let T(ref v) = STATIC;
2017-02-08 08:32:49 -06:00
assert_eq!(v[0], 5);
}