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