File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1653,11 +1653,12 @@ Path expressions are [lvalues](#lvalues-rvalues-and-temporaries).
1653
1653
1654
1654
### Tuple expressions
1655
1655
1656
- Tuples are written by enclosing two or more comma-separated
1656
+ Tuples are written by enclosing one or more comma-separated
1657
1657
expressions in parentheses. They are used to create [ tuple-typed] ( #tuple-types )
1658
1658
values.
1659
1659
1660
1660
~~~~~~~~ {.tuple}
1661
+ (0,);
1661
1662
(0f, 4.5f);
1662
1663
("a", 4u, true);
1663
1664
~~~~~~~~
@@ -2578,7 +2579,7 @@ to the record type-constructor. The differences are as follows:
2578
2579
2579
2580
Tuple types and values are denoted by listing the types or values of their
2580
2581
elements, respectively, in a parenthesized, comma-separated
2581
- list. Single-element tuples are not legal; all tuples have two or more values.
2582
+ list.
2582
2583
2583
2584
The members of a tuple are laid out in memory contiguously, like a record, in
2584
2585
order specified by the tuple type.
Original file line number Diff line number Diff line change @@ -747,7 +747,7 @@ fn area(sh: Shape) -> float {
747
747
748
748
Tuples in Rust behave exactly like structs, except that their fields
749
749
do not have names. Thus, you cannot access their fields with dot notation.
750
- Tuples can have any arity except for 0 or 1 (though you may consider
750
+ Tuples can have any arity except for 0 (though you may consider
751
751
unit, ` () ` , as the empty tuple if you like).
752
752
753
753
~~~~
You can’t perform that action at this time.
0 commit comments