mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Update tutorial: 1-tuples now exist
This commit is contained in:
parent
44d4d6de76
commit
621d45b341
@ -747,7 +747,7 @@ fn area(sh: Shape) -> float {
|
|||||||
|
|
||||||
Tuples in Rust behave exactly like structs, except that their fields
|
Tuples in Rust behave exactly like structs, except that their fields
|
||||||
do not have names. Thus, you cannot access their fields with dot notation.
|
do not have names. Thus, you cannot access their fields with dot notation.
|
||||||
Tuples can have any arity except for 0 or 1 (though you may consider
|
Tuples can have any arity except for 0 (though you may consider
|
||||||
unit, `()`, as the empty tuple if you like).
|
unit, `()`, as the empty tuple if you like).
|
||||||
|
|
||||||
~~~~
|
~~~~
|
||||||
|
Loading…
Reference in New Issue
Block a user