You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/tokens.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -637,18 +637,18 @@ start with `0` and each successive index increments the value by `1` as a
637
637
decimal value. Thus, only decimal values will match, and the value must not
638
638
have any extra `0` prefix characters.
639
639
640
+
Tuple indices may not include any suffixes (such as `usize`).
641
+
640
642
```rust,compile_fail
641
643
let example = ("dog", "cat", "horse");
642
644
let dog = example.0;
643
645
let cat = example.1;
644
646
// The following examples are invalid.
645
647
let cat = example.01; // ERROR no field named `01`
646
648
let horse = example.0b10; // ERROR no field named `0b10`
649
+
let unicorn = example.0usize; // ERROR suffixes on a tuple index are invalid
647
650
```
648
651
649
-
> [!NOTE]
650
-
> Tuple indices may include certain suffixes, but this is not intended to be valid, and may be removed in a future version. See <https://github.com/rust-lang/rust/issues/60210> for more information.
0 commit comments