2013-07-19 15:25:48 -05:00
|
|
|
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
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
|
|
|
}
|