From bf274bc18bcbfea1377c5c64ae0cc099b03d9beb Mon Sep 17 00:00:00 2001 From: P1start Date: Sun, 10 Aug 2014 15:54:33 +1200 Subject: 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); --- src/doc/rust.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/doc') diff --git a/src/doc/rust.md b/src/doc/rust.md index eb97a75e766..fb2407e5163 100644 --- a/src/doc/rust.md +++ b/src/doc/rust.md @@ -2555,6 +2555,8 @@ The currently implemented features of the reference compiler are: which is considered wildly unsafe and will be obsoleted by language improvements. +* `tuple_indexing` - Allows use of tuple indexing (expressions like `expr.0`) + If a feature is promoted to a language feature, then all existing programs will start to receive compilation warnings about #[feature] directives which enabled the new feature (because the directive is no longer necessary). However, if -- cgit 1.4.1-3-g733a5