diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-05-01 11:12:16 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-05-01 20:20:20 +0530 |
| commit | d3b7c5258f5b8871354e46bb60cca7d04be1b191 (patch) | |
| tree | 763580c351de5856f530521497178044ddfc2558 /src/doc/trpl | |
| parent | 4fda7e8b389dc0666921c95be324b2ea66a00853 (diff) | |
| parent | 8c38dfd537eba8947d2397b9e3f4a56bdb0647fe (diff) | |
| download | rust-d3b7c5258f5b8871354e46bb60cca7d04be1b191.tar.gz rust-d3b7c5258f5b8871354e46bb60cca7d04be1b191.zip | |
Rollup merge of #24992 - steveklabnik:gh24730, r=alexcrichton
Fixes #24730 r? @alexcrichton
Diffstat (limited to 'src/doc/trpl')
| -rw-r--r-- | src/doc/trpl/primitive-types.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/doc/trpl/primitive-types.md b/src/doc/trpl/primitive-types.md index aca6e327c3b..e017e222c74 100644 --- a/src/doc/trpl/primitive-types.md +++ b/src/doc/trpl/primitive-types.md @@ -248,6 +248,14 @@ or “breaks up” the tuple, and assigns the bits to three bindings. This pattern is very powerful, and we’ll see it repeated more later. +You can disambiguate a single-element tuple from a value in parentheses with a +comma: + +``` +(0,); // single-element tuple +(0); // zero in parentheses +``` + ## Tuple Indexing You can also access fields of a tuple with indexing syntax: |
