2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(non_upper_case_globals)]
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
struct T (&'static [isize]);
|
2014-07-04 00:56:57 -07:00
|
|
|
static t : T = T (&[5, 4, 3]);
|
2013-09-25 00:43:37 -07:00
|
|
|
pub fn main () {
|
2013-11-01 18:06:31 -07:00
|
|
|
let T(ref v) = t;
|
|
|
|
assert_eq!(v[0], 5);
|
2013-08-19 14:20:50 -07:00
|
|
|
}
|