rust/src/test/run-pass/expr-repeat-vstore.rs

17 lines
372 B
Rust
Raw Normal View History

2013-10-23 03:49:18 -05:00
#[feature(managed_boxes)];
pub fn main() {
let v: ~[int] = ~[ 1, ..5 ];
println!("{}", v[0]);
println!("{}", v[1]);
println!("{}", v[2]);
println!("{}", v[3]);
println!("{}", v[4]);
let v: @[int] = @[ 2, ..5 ];
println!("{}", v[0]);
println!("{}", v[1]);
println!("{}", v[2]);
println!("{}", v[3]);
println!("{}", v[4]);
}