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:
parent
cbe9fb45bc
commit
2e86929a4a
122 changed files with 260 additions and 266 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue