Implement tuple and tuple struct indexing
This allows code to access the fields of tuples and tuple structs: let x = (1i, 2i); assert_eq!(x.1, 2); struct Point(int, int); let origin = Point(0, 0); assert_eq!(origin.0, 0); assert_eq!(origin.1, 0);
Showing
src/test/run-pass/tuple-index.rs
0 → 100644
想要评论请 注册 或 登录