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