about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-25 15:21:26 +0000
committerbors <bors@rust-lang.org>2014-06-25 15:21:26 +0000
commit7be7a8fb3a430704d2cb631df2f69b5725002b9f (patch)
tree5e7a970d7ae70067d09dd40faad29f74c4a181b0
parent2f74325fcfcf0e8bc478674f996a190f6a58b20c (diff)
parent53627dd1f21820f295d366fc491e5fa88be40fd1 (diff)
downloadrust-7be7a8fb3a430704d2cb631df2f69b5725002b9f.tar.gz
rust-7be7a8fb3a430704d2cb631df2f69b5725002b9f.zip
auto merge of #15121 : steveklabnik/rust/matching_docs, r=alexcrichton
Fixes #11113.
-rw-r--r--src/doc/tutorial.md11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md
index d4f446b2933..65ed2680dd6 100644
--- a/src/doc/tutorial.md
+++ b/src/doc/tutorial.md
@@ -566,9 +566,14 @@ tuple, introducing two variables at once: `a` and `b`.
 let (a, b) = get_tuple_of_two_ints();
 ~~~~
 
-Let bindings only work with _irrefutable_ patterns: that is, patterns
-that can never fail to match. This excludes `let` from matching
-literals and most `enum` variants.
+Let bindings only work with _irrefutable_ patterns: that is, patterns that can
+never fail to match. This excludes `let` from matching literals and most `enum`
+variants as binding patterns, since most such patterns are not irrefutable. For
+example, this will not compile:
+
+~~~~{ignore}
+let (a, 2) = (1, 2);
+~~~~
 
 ## Loops