From d6ea8627ba6e5b2f109f40703f6766d6d12355a3 Mon Sep 17 00:00:00 2001 From: Zooko Wilcox-O'Hearn Date: Wed, 25 Jun 2014 01:34:24 +0000 Subject: [PATCH 1/2] add "(see below)" to a reference to a new concept This is because I observed someone reading the tutorial who thought they'd missed something when they got to the mention of variable bindings. This patch doesn't reflow the paragraphs so that you can see the semantic change that I made, and a subsequent patch will reflow this paragraph. Fixes https://github.com/rust-lang/rust/issues/13570. --- src/doc/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md index 9b9153fe5794..ac8b70185eb7 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -474,7 +474,7 @@ often convenient to use a block expression for each case, in which case the commas are optional as shown below. Literals are valid patterns and match only their own value. A single arm may match multiple different patterns by combining them with the pipe operator (`|`), so long as every -pattern binds the same set of variables. Ranges of numeric literal +pattern binds the same set of variables (see "destructuring" below). Ranges of numeric literal patterns can be expressed with two dots, as in `M..N`. The underscore (`_`) is a wildcard pattern that matches any single value. (`..`) is a different wildcard that can match one or more fields in an `enum` variant. From 668bad6d4ce66bfdb700df55342716110968aa94 Mon Sep 17 00:00:00 2001 From: Zooko Wilcox-O'Hearn Date: Wed, 25 Jun 2014 01:35:50 +0000 Subject: [PATCH 2/2] reflow with emacs fill-paragraph (fill-column 71) --- src/doc/tutorial.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md index ac8b70185eb7..cb743f1cf887 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -473,11 +473,12 @@ by an *action* (expression). Each case is separated by commas. It is often convenient to use a block expression for each case, in which case the commas are optional as shown below. Literals are valid patterns and match only their own value. A single arm may match multiple different -patterns by combining them with the pipe operator (`|`), so long as every -pattern binds the same set of variables (see "destructuring" below). Ranges of numeric literal -patterns can be expressed with two dots, as in `M..N`. The underscore -(`_`) is a wildcard pattern that matches any single value. (`..`) is a -different wildcard that can match one or more fields in an `enum` variant. +patterns by combining them with the pipe operator (`|`), so long as +every pattern binds the same set of variables (see "destructuring" +below). Ranges of numeric literal patterns can be expressed with two +dots, as in `M..N`. The underscore (`_`) is a wildcard pattern that +matches any single value. (`..`) is a different wildcard that can match +one or more fields in an `enum` variant. ~~~ # let my_number = 1;