1
Fork 0

Allow use of [_ ; n] syntax for fixed length and repeating arrays.

This does NOT break any existing programs because the `[_, ..n]` syntax is also supported.
This commit is contained in:
Nick Cameron 2014-12-20 15:20:51 +13:00
parent cbe9fb45bc
commit 2e86929a4a
122 changed files with 260 additions and 266 deletions

View file

@ -16,9 +16,9 @@ const BAR:uint = Flopsy::Bunny as uint;
const BAR2:uint = BAR;
pub fn main() {
let _v = [0i, .. Flopsy::Bunny as uint];
let _v = [0i, .. BAR];
let _v = [0i, .. BAR2];
let _v = [0i; Flopsy::Bunny as uint];
let _v = [0i; BAR];
let _v = [0i; BAR2];
const BAR3:uint = BAR2;
let _v = [0i, .. BAR3];
let _v = [0i; BAR3];
}