feat: 数组类型语法 [T; N] 改为 T[N] 后置语法

This commit is contained in:
2026-06-05 19:48:56 +08:00
parent ab4cc9a28b
commit 175f8a6658
7 changed files with 35 additions and 36 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
struct Point { x: i64, y: i64 }
fn main() -> i64 {
let arr: [Point; 2] = arr;
let arr: Point[2] = arr;
arr[0] = Point { x: 10, y: 20 };
arr[1] = Point { x: 30, y: 40 };
print_i64(arr[0].x);