Fallout - change array syntax to use ;

This commit is contained in:
Nick Cameron 2014-12-30 21:19:41 +13:00
parent 57a74eda88
commit 7e2b9ea235
66 changed files with 223 additions and 222 deletions

View file

@ -14,11 +14,11 @@
// #4264 fixed-length vector types
pub fn foo(_: [int, ..3]) {}
pub fn foo(_: [int; 3]) {}
pub fn bar() {
const FOO: uint = 5u - 4u;
let _: [(), ..FOO] = [()];
let _: [(); FOO] = [()];
let _ : [(), ..1u] = [()];

View file

@ -54,7 +54,7 @@ fn main() {
// and tuples
assert_eq!(size_of::<(u8, Box<int>)>(), size_of::<Option<(u8, Box<int>)>>());
// and fixed-size arrays
assert_eq!(size_of::<[Box<int>, ..1]>(), size_of::<Option<[Box<int>, ..1]>>());
assert_eq!(size_of::<[Box<int>; 1]>(), size_of::<Option<[Box<int>; 1]>>());
// Should apply to NonZero
assert_eq!(size_of::<NonZero<uint>>(), size_of::<Option<NonZero<uint>>>());

View file

@ -26,7 +26,7 @@ enum e2 {
}
enum e3 {
a([u16, ..0], u8), b
a([u16; 0], u8), b
}
pub fn main() {