We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2f74325 + 53627dd commit 7be7a8fCopy full SHA for 7be7a8f
src/doc/tutorial.md
@@ -566,9 +566,14 @@ tuple, introducing two variables at once: `a` and `b`.
566
let (a, b) = get_tuple_of_two_ints();
567
~~~~
568
569
-Let bindings only work with _irrefutable_ patterns: that is, patterns
570
-that can never fail to match. This excludes `let` from matching
571
-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
572
+example, this will not compile:
573
+
574
+~~~~{ignore}
575
+let (a, 2) = (1, 2);
576
+~~~~
577
578
## Loops
579
0 commit comments