mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
9 lines
174 B
Rust
9 lines
174 B
Rust
//@ 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);
|
|
}
|