mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-16 02:24:35 +00:00
10 lines
173 B
Rust
10 lines
173 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);
|
|
}
|